Click or drag to resize
Template file sections
Print this page

This section provides information about TDE template structure and details about each section that can be included.

Each template file describes a single data operation. For example, you can create a template that imports, exports, or deletes data from a TDE table. A template that imports data can add rows to a table or update existing rows.

When importing or exporting data,templates have an Input, which is a data source that supplies the data for the template operation, and an Output, which is the data created or generated by the operation.

  • When you update or create rows in a TDE table, the input is the file you provide, and the output is the TDE table.
  • When you retrieve data from a TDE table, the input is the TDE table, and the output is the file that gets generated.

Important: Entries in a template must follow template syntax.

Template file structure

A template file follows the INI file format. This format is a collection of name/value pairs divided into these sections:

[Template] section

Defines general template settings, giving the intent of the template and describing the data to be created, updated, exported, or deleted.

[User] section

Defines user input variables (values that are supplied as run-time parameters).

[Calculated] section

Lets you define functions that operate on that data that you import or export.

[Columns] section

Provides logical names for input columns when importing from a CSV file that has no header row.

[Output] section

Defines the final mapping of input and calculated values to output columns. You can have multiple Output sections, so that a single input row generates multiple output rows.

[Filter] section

Lets you filter input rows to indicate which ones you want to process as well as filter rows being retrieved. Many tables have predefined fetchers to ensure that data retrieve operations return a manageable amount of data.

[Script] section

Lets you add custom Javascript functions and hook into processing of each row.

[Response] section

Lets you define a detailed response for input templates.

[Namespaces] section

Defines namespaces for input templates.

[Defaults] section

Defines default measurement units to use throughout a template.

Tip Tip
View the sample templates, which illustrate how the template sections work together to describe an import or export.