Click or drag to resize
Template syntax
Print this page

This section details the required syntax for TDE templates.

This topic contains the following sections:

See also:

Note Note

TDE supports UTF-8 encoding within templates and input data.

File format

Template files use standard INI file format. That means:

  • Sections: Each section of the file is introduced with the section name in square brackets. For example:
    [Template]
  • Comments: Comments can be added to the file by starting a comment line with the "#" character. For example:
    # This is a comment
  • Entries: Within each section (except for the Columns section), entries appear in the form <name> = <value>. For example:
    Intent = Retrieve
    Tip Tip
    If the column name in your local file contains any non-alphanumeric characters, put square brackets around the column name: EnvelopeAddress = Input.[Mailing Address]
Note Note

In CSV files, stray spaces before the first quote of delimited fields can corrupt the parsing of those values.

Data source identifiers

There are two special identifiers that show the source of data values: Input and custom.

Input: When writing expressions, prefix your input values with the string Input. whenever the value is coming from the input. No other values have prefixes.

Note that the Input. prefix can apply to data from a Verizon Connect table (on a Retrieve template) or from a CSV file (on any other type of template):

[Calculated]                               # Create/Update template
Weight = Input.Empty + Input.Load          # columns Empty and Load of CSV summed to create variable Weight
[Output]                                   # Retrieve template
Name = Input.Tag                           # column Tag from table exports to column Name of output file

Custom: If a table has been augmented to store custom data (such as Driver, Job, Marker, and Unit), prefix those column references with the string custom.:

[Output]                                   # Create/Update template
custom.AddedTableColumn = Input.MyValue    # prefix 'custom' denotes a custom table column
[Output]                                   # Retrieve template
MyValue = custom.AddedTableColumn          # prefix 'custom' replaces prefix 'Input'
The prefix prevents conflicts in column naming, which much be unique.
Type conversion and formatting

There are two sections in which you may need to convert or format data types: User and Output.

In these sections, the name (left-side) portion defines both the name of a variable/column and its type. (In the Output section, you can omit the type if no conversion is needed).

The syntax is to specify the name with the type in parentheses. To specify both a type and its units of measure, separate them by a comma. For example:

Radius(Distance,Feet) = "Marker's radius in feet"

Which units of measure you can use depends on the specific data type. For most types, implied type conversions are straightforward. For example, you do not need to indicate how to convert between kilometers and miles.