Home > Cloud Cruiser 4 > Collecting, transforming, and publishing > XML > Data source properties

Data source properties

Creating an XML data source

The data to be read by a collection is the file on the Cloud Cruiser server specified by the path in the File Name field of the data source. You have some flexibility as to how you create this file, and the following fields in the data source reflect those choices:

  • Source: How the file is created. Select one of the following:
    • File: The file is either a static upload or is placed on the file system by a process not triggered by Cloud Cruiser. You can do one of the following:
      • Upload a file. Click Upload and choose the file from your local drive. This uploads the file to the Cloud Cruiser server, storing it in your usage files directory, and fills the File Name field with the path to this file. This option provides an easy way to place a file on the server and is usually used for testing or for a one-time import of customers or other configuration data.
      • Enter a dynamic path. In the File Name field, enter the full path to the file on the server, optionally using one or more parameters so that a different filename is used on each run. For example, ${env.usageDir}\3PAR\${env.selectDate}.csv. This option enables you to set up an external process that writes a new usage file for your collection to read on each run.

        You can specify a File Name that matches multiple files, enabling a collection to read all of those files in a single run. To do this, use the wildcard character ? in place of a character in the file path.

        For example, the File Name c:\myfile_??.csv matches c:\myfile_01.csv and c:\myfile_AB.csv.

    • Command: The file is generated on the Cloud Cruiser server by executing a command just before running a collection that uses the data source. This allows you to retrieve up-to-the minute data when a collection runs. The collection executes the command, passing parameters to this process that include the name of the output file for it to write. The collection then uses this file as the data source. If you select Command you must complete the following fields:
      • File Name: The full path on the server of the output file that the command writes (see the Tip below). This path is appended to the command string. See also Output Param.
      • Command: The command to run. On Windows, you might have to call the command shell cmd.exe at the beginning of this string.
      • Simulation Parameters: (optional) Text to append to the command when the command is run during a simulation when editing a workbook. This allows you to pass parameters to your process so that it can behave differently for a simulation.
      • Date Parameter Name: The parameter to append to the command before the select date so that your process can produce output for the correct date. For example, if Date Parameter Name is -d and a collection runs against the data source on December 15, 2014, the string -d 20141215 is appended to the command.
      • Output Parameter Name: The parameter to append to the command before File Name so that your process can write its output to the correct file.
      • Timeout: The number of milliseconds for a collection to wait for the command to complete. This number represents total execution time. If the process doesn't return within the timeout, it is terminated and the collection fails.
  • File Name: The path to the file that collections will read. Your choice of Source affects this.

    If not uploading a file, use the system parameter ${env.selectDate} in the File Name. Then, if your Source is a file, automate the creation of usage files so that each is written to a file with the current date in the same part of its name. If your Source is a command, this is already the case because File Name is the file written by the command.

    Using the select date in the filename allows you to keep older usage files available for troubleshooting or an audit trail while your collection always reads the file with the data relevant to the select date for which it runs. 

    HPE also recommends using a path underneath ${env.usageDir} for such files.

Example

The following screenshot shows a data source that might run the command: C:\cc-working\scripts\myscript.bat -d 20141215 -o C:\cc-working\usage_files\customers\customerList_20141215.xml

Screenshot of example XML data source using a command

Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP