Exporting a Project to a Batch Script - trillium_discovery - trillium_quality - Latest

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Version
Latest
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
Copyright
2024
First publish date
2008
Last updated
2024-10-18
Published on
2024-10-18T15:02:04.502478

You can export a project into a batch script that can be run on a 64-bit Linux or Windows platform outside of the Control Center. When you export a project to batch, a script will be generated. You can select and run the appropriate script depending on your system environment.

Batch scripts for Linux

  • runprojectN.sh

Batch scripts for Windows

  • runprojectN.bat
Note: N is the number of your project.

General Guidelines

  • Batch scripts are for 64-bit processing only. For existing 32-bit projects, you must export the project again to recreate a batch script to run in 64-bit.
  • Exporting a batch project requires the Batch Deployment Tool (BDT), which is an optional installation component. If the BDT is not installed, the batch script export feature is disabled.
  • If your Trillium Quality batch project includes a Database Read/Write process, uses an ODBC data source that uses an ODBC driver (database adapter) and the Vendor-Supplied ODBC Adapter, and you run the exported batch script in a Linux environment (Trillium server installed on a Linux system), the batch script will fail. This scenario is supported only when the Trillium server is installed on a Windows system.
  • When running the Control Center Client on a different machine than the Server, the TS_QUALITY environment variable is required to set to use the Batch Deployment Tool. Ensure to set the TS_QUALITY user variable to point to any folder with write permissions on the Client, for example, C:\temp\Trillium Software.
  • If you export a project that contains processes with multiple outputs (such as Global Data Router) into a batch script, you must run it inside the Control Center prior to the export.
  • The batch export process removes all entity IDs from the exported project.

To export a project to a batch script

  1. From the Navigation or Project View, right-click the project and select Export. The Export Project Options window opens.
    Note: If you are exporting from the Projects tab on the Deploy bar, the command is Deploy to Batch (Export).
  2. Click the open/close icon () to expand or collapse an option block in the window.
  3. In Export Location, select the local or server file system as the export destination.
    • To export to the local file system, click the Browse button to select the destination folder or create a new one.
    • If you export to the server file system, the destination is always your project folder in the server. For example, ../export/repository_name/projectN.
    • When the BDT and TS Quality are installed on separate machines, you cannot export a project to the local file system with the original source data. You must export it to the server file system or export without the original source data.
  4. In Type of Export, select Export scripts for batch execution.
  5. (Optional) To include the data from the first input entity in the project, check the Include original source data with export box.
  6. (Optional) To include the input data from your database, select the Include database source data with export box. The Include Database Read for table_name options display. See Reading Data from a Database for a Batch Script for details.
  7. Select either Maximize Performance or Minimize Disk Space. If you select Minimize Disk Space, the Export process applies compression to all the source files and output files in the process except the last one. This may affect the performance of the exported project.
    Note: Another way to minimize disk space is to select the Use pipes option (Step 8).
  8. In Script Options:
    1. Select the Target Platform for your batch script. Full cross-platform support is available. For example, you can export a Windows project and generate a script for use on Linux or vice versa.
    2. Use Customization Extension to specify the file extension to be used for platform-specific generated files. The default for Windows and Linux platforms is .len.
    3. Use Report Encoding to specify the encoding scheme to be used for the output reports. The default is UTF8.
    4. If you would like the generated script to pipe the data through the project's processes, select Use pipes. Using pipes in a project moves data from process to process without creating interim output entities.
    5. If you would like to use UCS2 for all schema files (DDX) except the initial and final files, select Use UCS2 Encoding.
  9. If the input entity contains delimited data, specify the Original Input Delimiter.

    When the input entity is a delimited file, the export will use the default entity name. The default entity name is the original entity name but the Control Center changes the file extension to ".dat". You need to open the settings file for the first process and replace this name before running the batch project. See Running a Batch Project for details.

    1. Specify the Delimiter and the Delimiter Encoding. If the delimiter that you want is not in the Delimiter list:

      • Click AdvancedDelimiter.
      • Select Single, Double, or Triple for the delimiter characters.
      • Click through the Decimal Representation list or enter the decimal value to specify each character. This window also shows the hexadecimal (HEX) representation of the delimiter. For example, when using double delimiters, click Double and select one delimiter from the Single list and one from the Double list.
      • Click OK. The new delimiter displays in the Delimiter field.
      Note: An extended ASCII character can be a delimiter.
      Note: The Original Input Delimiter setting will only be applied to delimited input entities on export. For example, if the project has two input entities, a delimited input and a database read, and you specify a "Comma" for the original input delimiter on export, the setting will only be applied to the delimited input and not to the database read.
    2. Select the Quotes option to specify how to handle quotation marks.
      • Use Quotes as Data. All quotation marks are treated as data. Default.
      • Use Matched Quotes as Qualifiers. All pairs of quotation marks are treated as qualifiers.
      • Use Unmatched Quotes as Qualifiers. Quotation marks that are not in pairs are also treated as qualifiers.
      Note: The quote character will be set to the quote character you specified in the Create Entity Wizard.
    3. If the input data will include header records, select Inputs have headers.
  10. In Final Output Delimiter:
    1. If you require delimited output files, specify the Delimiter and Delimiter Encoding. To specify special delimiters, click Advanced Delimiter (see Step 9).
    2. Select the header option in Use file headers.
    3. To enclose values in quotation marks in the output file, select Use quotes as qualifiers.
      Note: Ignore this option if the last process in a project is Database Write. The output will be written to the database, not to the output entity. If you select this option, the batch script will fail at the last step.
  11. Click Export. The message indicates that the files are being copied.
  12. After the message clears, check the folder you specified and verify that the batch scripts were created. The generated batch scripts are stored in the project's \scripts directory. For example, runprojectN.cmd is created in: path\projectN\scripts where path is the path you specified in Export Location and N is the number of your project.
  13. Run the batch script.