Utility - exportSnapshotRun
Utility - exportSnapshotRun
Description :
This command exports the results of a Snapshot Job run index to a file. You must identify the job run by its run number. You can save the run index results in HTML or CSV format.
Return type : java.lang.Void
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
jobGroupName | String | Fully qualified job group where the Snapshot Job is stored. |
jobName | String | Name of the Snapshot Job to export. |
runId | Integer | Job Run Id of the Snapshot Job run to export. |
exportFileName | String | Name of the file that holds the export. |
exportType | String | Format for saving exported results (CSV or HTML). |
Example
The following example shows how to export a Snapshot Job's run index results. The example also shows how to obtain the job run ID before running the export command.
Script
JOB_GROUP="/Job_Group"
JOB_NAME="Snapshot Job"
JOB_DB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`
JOB_RUN_KEY=`blcli JobRun findAllRunKeysByJobKey $JOB_DB_KEY`
JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $JOB_RUN_KEY`
SNAPSHOT_JOB_RUN_EXPORT=`blcli Utility exportSnapshotRun $JOB_GROUP $JOB_NAME $JOB_RUN_ID "C:/temp/sampleJobResult.csv" "CSV"
JOB_NAME="Snapshot Job"
JOB_DB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`
JOB_RUN_KEY=`blcli JobRun findAllRunKeysByJobKey $JOB_DB_KEY`
JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $JOB_RUN_KEY`
SNAPSHOT_JOB_RUN_EXPORT=`blcli Utility exportSnapshotRun $JOB_GROUP $JOB_NAME $JOB_RUN_ID "C:/temp/sampleJobResult.csv" "CSV"
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*