This tool is ONLY available when using CAST Imaging installed on Microsoft Windows using the traditional installer (i.e. not supported when running CAST Imaging on Docker).

Summary: step-by-step instructions for exporting the data required for the CAST Imaging.

Requirements

CAST Storage Service/PostgreSQL(tick)The machine on which you are running this extraction must have local or network access to the CAST Storage Service/PostgreSQL where the required data is stored.
Number of Applications per Analysis Service schema(tick)

At the current time, it is only possible to extract data from an Analysis Service which contains one single Application, however it is possible to run multiple export actions against multiple Analysis Service schemas to generate data for multiple Applications. This will result in multiple CSV output files which can all be referenced during the import action.

How does it work?

The export process is run with the CLI tool exporter.exe. This tool is installed with CAST Imaging and can be found in the following location:

%PROGRAMFILES%\CAST\ImagingSystem\imagingetl
CAST recommends running this tool from the location above, however, you can run it from another location or machine if required - in this case, please ensure that you copy the entire "exporter" or "imagingetl" folder to the location you require. Copying just the exporter.exe file and attempting to run it may cause the tool to crash.

This tool should not be used concurrently on the same target schema. This can cause issues during the export process. If this occurs, a warning message will be displayed in the exporter log as follows:

WARNING MODULMSG ; Body An existing execution of exporter started on <DATE TIME>

Execute the below command line to see all the available arguments: 

C:\Program Files\CAST\ImagingSystem\imagingetl>exporter.exe -h

Click to enlarge

Step 1 - run the export

To generate the data ZIP, run the following command either direct in a Command Prompt or via a batch file, changing it to suit your own environment:

exporter.exe --host <name_of_CSS_host_server> --user <CSS_user_name> --password <CSS_password> --port <CSS_port_number> --mngt <name_of_management_schema> --outputdir c:\temp\my_output_path --log c:\temp\log\log.txt

Parameters: 

ParameterRequired?Description

-h / --help

(error)Displays the help message.
--version(error)

Show program's version number and exit.

--host(error)Enter the network host name of the server on which the CAST Storage Service/PostgreSQL is located. Default = localhost.
--user(error)Enter the CAST Storage Service user login. Default = operator.
--password(error)Enter the CAST Storage Service password corresponding to the user entered in --user. Default = CastAIP.
--port(error)

Enter the port number for the target CAST Storage Service/PostgreSQL. Default = 2282 (CAST Storage Service 3):

CSS22280
CSS32282
--schema(error)

CAST recommends using --mngt instead of --schema. Please use one or the other. --schema will eventually be phased out in favour of --mngt.

Enter the name of the Analysis schema schema containing the Application you would like to work with in CAST Imaging.

You can view the name of the Analysis Service schema as follows:

--database

Available in ≥ 2.1.0-funcrel.

(error)

This option allows you to specify a specific CAST Storage Service/PostgreSQL database name other than the default "postgres". In the vast majority of situations, this option is not required. It is only necessary if the CAST AIP schemas as stored on the CAST Storage Service/PostgreSQL instance in a database other than the default "postgres". For example:

--database customdb

--mngt

Available in ≥ 2.0.0-beta6.

(error)

CAST recommends using --mngt instead of --schema. Please use one or the other.

Enter the name of the Management schema (i.e. the combined installation) containing the Analysis schema in which the Application you would like to work with in CAST Imaging is stored.

You can view the name of the Management schema as follows:

--outputdir(tick)Enter the location where the resulting output ZIP will be stored. This folder must exist.
--log(tick)Enter the location for the output log file. This file must exist.
--debug(error)

Print debug messages (default: false).

--debuginfo

(error)

Control check files: yes|no (default:NO).

--cfg(error)

Regeneration of config files: yes|no (default:NO).

--aiptable

(error)

Force the extraction of AIP tables: yes|no (default:NO).

--limitedscope

Available in ≥ 2.1.0-funcrel.

(error)This option will perform a truncated export of application data (i.e. not all the application data is exported) in order to improve the time needed to show results in CAST Imaging. This option is therefore aimed at POC, demos etc. where results need to be produced quickly. It should not be used in production environments.

--applicationname

Available in ≥ 2.1.0-funcrel.

(error)

This option allows you to specify the name of the Application for display purposes in CAST Imaging. For example:

  • you may have an Application called "TopSecretApplicationName" in your CAST AIP schemas and you would rather have this Application displayed with a more friendly/appropriate/anonymized name such as "ApplicationX".
  • you may want to import the same Application multiple times into CAST Imaging, if so, use this option to name the Application appropriately, e.g. "MyExportV1", "MyExportV2", "MyExportV3" etc.

If so, use the following syntax:

exporter.exe --mngt <name of schema containing the application to export> --applicationname <name of application as displayed in CAST Imaging> --outputdir c:\temp\my_output_path --log c:\temp\log\log.txt

--applicationname will accept the following characters only:

  • A-Z
  • a-z
  • 0-9_

Error codes

1

Any error related to process and also if required parameter is empty.

2

Give either --mngt parameter or --schema parameter. Don't give both.

3

Missing --mngt or --schema parameter. Mention any of these parameter.

4

Check your connection details. Mentioned management schema does not exist / No local schema associated with this management schema.

5

Mentioned management schema is not valid.

6

There are multiple applications under same local schema.

7

No application found in local schema. Nothing to extract.

Step 2 - Check the results

Assuming the extraction process is successful, the data will be extracted to multiple .CSV files which will be automatically zipped to a ZIP file stored in the location defined in --outputdir. The ZIP file will be named with the name of the Application that has been extracted (MEUDON in the example below):

This ZIP will need to be uploaded to the Application Management portal in CAST Imaging as part of the data import action.

  • If you have run multiple export actions to export data for multiple Applications, you will now have multiple ZIP files.
  • You can include multiple Application data in one ZIP file for the data import action. In other words, if you have run multiple export actions to export data for multiple Applications, you will now have multiple ZIP files - if necessary, the content of the multiple ZIP files (not the ZIP files themselves) can be included in one single ZIP for the data import action. If you do this, there are no constraints on the name of the ZIP file.

Tips

[WinError 10054] An existing connection was forcibly closed by the remote host

If you are attempting to export from a PostgreSQL instance installed on Microsoft Windows (i.e. CAST Storage Service) and your application is very large, you may find that the export process fails with the error which is caused by a timeout:

[WinError 10054] An existing connection was forcibly closed by the remote host

By default, on PostgreSQL instances installed on Microsoft Windows, the PostgreSQL instance timeout is set to 2hrs, therefore any export process that takes longer than 2hrs will fail. If you encounter this error, it is possible to modify the timeout setting using the postgresql.conf file located here:

%PROGRAMFILES%\CAST\CastStorageService<version>\db_data\

Edit this file with a text editor and find the tcp_keepalives_idle entry:

# - TCP settings -
# see "man tcp" for details

#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
					# 0 selects the system default

By default, this entry is commented out and will be ignored - this means that the default value of 0 applies - i.e. the Microsoft Windows system default of 2hrs. To set a longer timeout interval, uncomment the entry and set required interval in seconds (above 2hrs). For example to set a timeout of 6hrs:

# - TCP settings -
# see "man tcp" for details

tcp_keepalives_idle = 21600		# TCP_KEEPIDLE, in seconds;
					# 0 selects the system default

Save the file and then restart the CAST Storage Service instance to apply the change.

Note that tcp_keepalives_idle is ignored when the PostgreSQL instance is installed on Linux.

Next steps?

Please see Import the CSV data for more information about the next step.