DATA tag

Specifies that an Analytics table output by an analytic script is copied to a central data storage location in Robots.

Typically, you store Analytics tables so that they can be used as input tables for subsequent analytic scripts.

Note

Storing Analytics tables in a central data storage location is supported by ACL Robotics with an on-premise Robots Agent only. This capability is not available if you are using a cloud-based Robots Agent. The DATA tag is ignored in analytic scripts run with a cloud-based agent.

Syntax

//DATA table_name
  <description>

Parameters

Name Description
table_name

The name of the Analytics table to be stored.

Note

The table_name value must exactly match the name of the Analytics output table in the analytic script. You are not naming a table with table_name, you are matching a table name specified in the script.

You can use wildcard characters in table_name to assist with matching a table name in the script.

You cannot use a variable for table_name.

You must specify the table name, not the source data file name.

Correct:

//DATA Missing_Checks

Incorrect:

//DATA Missing_Checks.fil

Note

If an existing Analytics table in the data subfolder has the same name as the value you specify, the existing table is overwritten.

Unsupported characters in the data table name

Do not include any spaces in table_name.

Do not use any of the following characters in table_name. They are not supported:

! @ # $ % ^ & ( ) - + = { } [ ] | \ : ; ' " < > , / . ` ~

Wildcard characters

You can use wildcard characters in table_name if part of the table name may change. For example, if the table name depends on the month (invoices-jan, invoices-feb, and so on), specifying invoices-* ensures that the table is copied to the data subfolder regardless of the month suffix.

You can specify a single wildcard character to copy all Analytics output tables in the analytic script to the data subfolder:

//DATA *

Caution

Be careful when using wildcards characters. You may unintentionally overwrite existing data tables if the wildcard pattern that you specify matches unintended tables.

As a best practice, make the value of table_name as specific as possible. Use wildcard characters only where they are required.

Uploads to Robots

For information about uploads to Robots, see Uploads to the cloud-based Robots app.

description

optional

Descriptive text about the output table or other information. The description can be multiline, but it cannot skip lines.

The description appears in the analytic header only and is not visible to end users in Robots.

Examples

Copying an Analytics table to the storage location

The following analytic header specifies that the Invoices table, which is output in the associated script, is copied to the storage location:

COMMENT
//ANALYTIC Import Table
//DATA Invoices
END
IMPORT DELIMITED TO Invoices "Invoices.fil" FROM "Invoices.csv" 0 SEPARATOR "," QUALIFIER '"' CONSECUTIVE STARTLINE 1 KEEPTITLE ALLCHAR ALLFIELDS

Remarks

Storing output tables

Output tables are not automatically copied to the storage location. You must use a DATA tag for each table that you want to store. You can include multiple DATA tags in an analytic header if necessary.

When should I use the DATA tag?

Two situations require use of the DATA tag and storing Analytics tables:

  • output tables are used as input for subsequent analytic scripts
  • users can select input tables or fields when scheduling an analytic script, or running it ad hoc

Note

If an entire data analysis process is completed using a single analytic script, use of the DATA tag is not required.

The DATA tag is not intended to be used for specifying result tables. Use the RESULT tag instead. For more information, see RESULT tag.

Output tables are used as input for subsequent analytic scripts

Depending on the deployment environment, and the structure of associated scripts, you may need to use the DATA tag to store an Analytics output table that you want to use in a subsequent analytic script.

During analytic script processing, Robots uses a temporary directory to store and access Analytics output tables, so you may not need to use the DATA tag.

The table below provides guidance.

Deployment environment Use the DATA tag if... Do not need the DATA tag if...
Robots

(Enterprise Edition only)

  • an Analytics table output in one robot task is required as input in another robot task
  • an Analytics table is output and subsequently input during a sequence of analytic scripts run in a single robot task
  • an entire data analysis process is completed using a single analytic script

Users can select input tables or fields

The TABLE and FIELD analytic tags create input parameters that allow a user to select an Analytics table, and to select fields from the table, for use as input to an analytic script. However, a table must pre-exist in the storage location in order to be available to be selected.

If you are developing an analytic script that allows a user to choose one or more input tables and fields, a prior analytic script with the DATA tag must run and save the appropriate table or tables to the storage location.

Locate output tables in the Source tables section in Robots

You can optionally add the src_ prefix to an output table name to locate the output table in the Source tables section of the Input/Output tab in Robots.

//DATA src_Invoices

You must add the prefix to the table name in both the DATA tag and in the accompanying script.

The Source tables section allows you to visually separate tables that provide input for subsequent scripts. If no output table names have the src_ prefix, the Source tables section does not appear in the Input/Output tab and all tables are located by default in the Other tables section.

Uploads to the cloud-based Robots app

With analytic scripts run in Robots installations, specifying DATA uploads the table layout only (field name, data type, field length) from the on-premise Robots Agent to the cloud-based Robots app in HighBond. Table data remains on your organization's network, within the Robots Agent directory.

All information is encrypted in transit.