...
...
Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Datashed is a utility for extracting data from IMOS and exporting it in various formats. It can be run stand-alone from the command line as an ad hoc utility†utility†, or it can be run from the Messaging Service. Datashed accepts many arguments, some of which may be incompatible with one another.
|
Datashed Use-Case Scenarios
...
Datashed is able to run a Report Designer report. This is particularly useful when scheduling a report to be emailed to a distribution list. When running a Report Designer report, the parameters of the datashed call will override any settings stored in the report definition. This includes overriding details such as which ouptut directory to use and which email address to send to.
datashed.exe
...
--rvTitle="Report
...
Title"
...
--outputPath="C:\temp"
Breakdown of this command:
Argument | Explanation |
---|---|
--rvTitle | Run a Report Designer report using the set Title. |
--outputPath | Output the contents of the report to this specified folder. IMOS will export the report in the format specified in the Report Designer report properties. You cannot export the report if it is set to open in List View. |
Running a Large Report Designer Report
For larger reports, data can be read from the database in chunks of records (default = 5000) to prevent out-of-memory exceptions that might occur from loading all the data at once.
datashed.exe
...
--rvTitle
...
"report_name_2"
...
--stream
datashed.exe
...
--rvTitle
...
"report_name"
...
--stream
...
--streamBatchSize
...
10000
Exporting a Voyage Pnl Snapshot XML
Datashed can export a Voyage Pnl Snapshot XML based on recalculation or a snapshot. The snapshot XML will include every Pnl line item detail and is specifically dependent upon the vnccmd pnlXml.
Examples:
datashed.exe
--rvForm Voyage
--rvFilter
"VesselCode==""XXXX""AND
VoyageNo==XXXX"
--action
"vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=daily&dataSource=EAP&voypnlNotificationXml=true&outputFolder=C:\temp"
--multithread
datashed.exe
--rvForm Voyage
--rvFilter
"VesselCode==""XXXX""AND
VoyageNo==XXXX" --action
"vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=current&dataSource=snapshot:EAP&voypnlNotificationXml=true&outputFolder=C:\temp"
--multithread
This method is best used with snapshot types like current, for which only one of each A, E, P can exist.
Breakdown of this command:
Argument | Explanation |
---|---|
--rvForm Voyage | Datashed command is run against the Voyage data object instead of a Report Designer report. |
--rvFilter "VesselCode==""XXXX""" AND VoyageNo==XXXX" | Datashed will run only against the Voyage data objects that match the provided VesselCode and VoyageNo. |
--action "vnccmd:pnlXml?vslCode=XXXX&voyNo=XXXX&snapshotType=current&dataSource=EAP&voypnlNotificationXml=true&outputFolder=C:\temp" | The action specified, pnlXml, acts on all voyages that match the VesselCode and VoyageNo filter and takes several arguments of its own; see below for more details on vnccmd:pnlXml. |
Bulk Saving Voyages to Update the "Current" Snapshot or Prompt Voyage XML Files
You may come across the following two scenarios that datashed.exe could help with:
If you enable configuration flag CFGCacheVoyPnl and require all voyages to be "bulk" saved.
If you have a Vessel Data Integration and require all vessel XML files to be bulk sent to their new system (requires Message Handler setup).
The command below can be set up as a one-time scheduled task.
Note: It is highly encouraged to test this in a database backup with one vessel first.
datashed.exe
...
--rvForm=Voyage
...
--rvFilter="VoyageStatusCode!=""Closed"""
...
--action
...
"vnccmd:saveVoyage?vslCode={VesselCode}&voyNo={VoyageNo}"
Bulk Saving Cargoes
If you want all cargoes to be saved, the command below can be set up as a one-time scheduled task.
Note: It is highly encouraged to test this in a database backup with one cargo first.
datashed.exe --rvForm=Cargo
...
--rvFilter="CargoID!=0"
...
--action
...
"vnccmd:saveCargo?cargoId={CargoID}"
Running the Trading Module Historical VaR
Datashed can run the Trading module Historical VaR report. This report is specifically dependent upon the vnccmd runHistoricalVarReport. The following is an example:
datashed.exe
...
--action
...
"vnccmd:runHistoricalVarReport?numberOfSteps=30&snapshotType=Ad-hoc&snapshotRef=Daily&step=1&stepUnit=Day&filter=CARGO&outputFile=C:\temp\VarReport.xml"
This example leverages the --action parameter of datashed to execute a runHistoricalVarReport command. For further information on the runHistoricalVarReport command, see below.
vnccmd:pnlXml
vnccmd is an internal utility for calling specific actions in IMOS from the command line. It is common to use one specific action, pnlXml, when working with datashed. Here is a list of the pnlXml action arguments.
Argument | Values | Notes |
---|---|---|
vslCode | Vessel Code | vslCode=VesselCode sets the Vessel Code parameter. This is a required parameter for this action; value is controlled using datashed.exe --rvFilter argument. |
voyNo | Voyage Number | voyNo=VoyageNo sets the Voyage Number parameter. This is a required parameter for this action; value is controlled using datashed.exe --rvFilter argument. |
snapshotType | Snapshot Type | snapshotType= |
any available IMOS snapshot type; the action will select only snapshots of that type.
| ||||||||
dataSource | snapshot:any combination of the following:
| dataSource=snapshot:any combination of (E)stimated, (A)ctual, or (P)osted to output a single snapshot XML file per type. | ||||||
deltaOnly | One of the following:
| deltaOnly=true exports the P&L XML only if the snapshot of the specified dataSource type has changed. deltaOnly=false or blank exports the P&L XML. | ||||||
voypnlNotificationXml | One of the following:
| voypnlNotificationXml=true creates Voyage P&L output XML in the summary format of voypnl notification message, using the same output format and tags as the voypnl XML generated by manually saving the voyage from the Voyage Manager. voypnlNotificationXml=false or blank uses the default format. | ||||||
outputFolder | \path\to\directory | The path to the preferred output location. | ||||||
format | One of the following:
| The format of the XML output:
|
Anchor | ||||
---|---|---|---|---|
|
vnccmd is also able to run the Trading Module Historical VaR Report. This allows you to schedule the Historical VaR report for regular output, and even automatically email it to certain recipients. Like the pnlXml command above, the runHistoricalVarReport has its own set of commands that are build into a datashed action argument.
Argument | Values | Notes |
---|---|---|
markets | markets=Baltic,Imarex_Bunker Comma-delimited market names. Ignore invalid individual market names. All markets are selected if the parameter is not set. | |
calendar | calendar=CNY A single Holiday Calendar Code value. Null if the value is invalid or not set. | |
refDateOffset | Integer | refDateOffset=-1 Day for which to run the Historical Var, referencing the current day. -1 meaning yesterday. Default to 0 if the value is invalid or not set. |
step | Integer | step=1 The size of the step; expressed in units. |
unit | One of the following:
| unit=Day The unit of the step. Default is Day. |
numberOfSteps | Integer | numberOfSteps=100 The number of steps to take historically, from the reference date. |
snapshotType | One of the following:
| snapshotType=Ad-hoc The Trading P&L Snapshot Type. |
snapshotRef | String | snapshotRef=Daily The Snapshot reference name; typically set in the Trading P&L Snapshot scheduled task. If left blank, you must enter a value for snapshotProfileName. |
snapshotDateOffset | Integer | snapshotDateOffset=-1 Specific day for which to retrieve a snapshot, referencing the current day. Only used if snapshotType is set. Default to 0 if the value is invalid or not set. If multiple snapshots exist for the same combination of snapshotRef and snapshotDateOffset, the latest snapshot for the combination of snapshotRef and snapshotDateOffset should be returned. |
snapshotProfileName | snapshotProfileName=STANDARD The Trading Profile name. If left blank, |
you must enter a value for snapshotRef. | ||
filter | filter=CARGOVSVESSEL Specifies the Trading Filter to apply to the snapshot. Ignore if blank. | |
reportType | One of the following:
| reportType=Detailed Determines if output should be the Detailed or Aggregated version of the Historical VaR. |
outputPath | \path\to\directory | outputPath=C:\Temp The path to the preferred output location. |
outputTab | Excel Worksheet Tab name | Tab name, only if the outputFile is an Excel file. |
emailTo | email@address.com | Comma-separated email distribution list for the report, which can be individual users, IMOS distribution groups, and companyNo (for company report distribution), similar to the datashed "emailTo" argument |
vcncmd:saveCargo
Saves cargo with a specified cargoID argument.
Argument | Values | Notes |
---|---|---|
cargoID | Numeric value of the specific Cargo ID | ID of the Cargo to save. |
vnccmd:deleteCargo
Deletes cargo with the specified cargoID argument.
Argument | Values | Notes |
---|---|---|
cargoID | Numeric value of the specific Cargo ID | ID of the Cargo to delete. |
Sending Emails
Datashed is able to send emails either through the command line parameters, or by running a report with an email distribution list configured. When sending an email, Datashed will use a Messaging Service Outgoing Message Location. This Outgoing Location must be an SMTP server with the Name default.