JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
The codesonar bi_transfer.py command can transfer warning information directly from the hub to your organization's business intelligence (BI) tool.
With CodeSonar factory settings, the only supported BI tool is Qlik. If you want to upload to a different tool, contact CodeSecure support.
The codesonar bi_transfer.py command transfers warning information from the CodeSonar hub to your local business intelligence (BI) tool, without the need to interact with the CodeSonar Web GUI or write a custom script.
There are four steps.
This page provides a full description of the codesonar bi_transfer.py command and all its options.
bi_transfer.py is a codesonar Python subcommand.
There are four forms of the command line for transferring warning information to your BI tool, representing the four steps of the process.
| 1. Create configuration file |
codesonar bi_transfer.py --create-bi-conf
path/to/conffile.conf \
--bi-tool tool_name |
|---|---|
| 2. Check connection |
codesonar bi_transfer.py --test-connection
path/to/conffile.conf
|
| 3. Download from hub |
codesonar bi_transfer.py --download
path/to/wfile.csv \
or
--type warning --hub [protocol://]host:port --search wsearch_expr \ [-auth authtype] [-hubuser username] [-hubpwfile pwfile] [-hubbearerfile bearerfile] [-hubcert certfile] [-hubkey privatekeyfile]
codesonar bi_transfer.py --download
path/to/wfile.csv \
--type warning --analysis-url aurl [--search wsearch_expr] \ [-auth authtype] [-hubuser username] [-hubpwfile pwfile] [-hubbearerfile bearerfile] [-hubcert certfile] [-hubkey privatekeyfile] |
| 4. Upload to BI tool |
codesonar bi_transfer.py --upload
path/to/wfile.csv \
--bi-config path/to/conffile.conf --validation path/to/tmpdir/ \ [--remote-file-name-prefix pref] |
| --create-bi-conf path/to/conffile.conf | Create a configuration file at the specified location. Depending on the value specified for --bi-tool, you may be prompted for additional information about your BI tool. This configuration file will subsequently be used in the "Check connection" and "Upload to BI tool" steps. |
|---|---|
| --bi-tool toolname | Specify the BI tool you are using. With CodeSonar factory settings, the only available setting is --bi-tool qlik, representing the Qlik data analytics tool. If you want to upload to a different BI tool, contact CodeSecure support. |
| --test-connection path/to/conffile.conf | Test the connection to the BI tool identified in the specified configuration file. |
|---|
or
| --download path/to/wfile.csv | Download information from the hub to a CSV file at the specified location. |
|---|---|
| --type warning | The only kind of information that can currently be downloaded from the hub is warning information. |
| --analysis-url aurl |
Get warnings from the analysis whose
Analysis:Warnings page
URL is aurl.
|
| --hub [protocol://]host:port | The hub location. |
| --search wsearch_expr |
Get only warnings that satisfy the constraints in
wsearch_expr.
|
| [-auth authtype], [-hubuser username], [-hubpwfile pwfile], [-hubbearerfile bearerfile], [-hubcert certfile], [-hubkey privatekeyfile] |
Specify how CodeSonar should authenticate the download
request. For details, see Hub
Authentication: Authenticated codesonar Subcommands. If you are using codesonar bi_transfer.py in a script or a similar unattended context, it will probably be most convenient to use bearer authentication: specify -auth bearer -hubbearerfile bearerfile, where bearerfile contains a valid session bearer token. |
| --upload path/to/wfile.csv | Upload information from the specified CSV file to the BI tool identified by --bi-config. |
|---|---|
| --bi-config path/to/conffile.conf | The configuration file identifying the BI tool to upload to. |
| --validation path/to/tmpdir/ |
If the CSV file at path/to/wfile.csv
is larger than 495 MB it will be split into chunks for upload.
Use this option to specify the temporary directory to be used
to store these chunks, along with any temporary files
associated with validating the files.
|
| [--remote-file-name-prefix pref] |
The uploaded chunks will be given names of the form
pref_chunknum_timestamp.csv,
where
|
The following instructions describe how to configure and use codesonar bi_transfer.py to transfer warning information from your CodeSonar hub to your Qlik deployment.
| host | the Qlik hostname you identified in step 2. |
|---|---|
| Auth Key | the Qlik API Key you created in step 3. |
| Space | the Qlik space you identified in step 4. If the space does not already exist, it will be created. |
The warning information is now uploaded to Qlik and ready for you to apply your own data analytics.