Skip to content

StateDMI / Command / AppendTable


Overview

The AppendTable command appends rows from one table to another table, resulting in more rows being added to the first table. This command does not “join” tables horizontally (for such functionality see the JoinTables command). For appended rows:

  • values in columns that are not matched are set to null in the receiving table
  • values in columns where the data types do not match are set to null in the receiving table

Command Editor

The following dialog is used to edit the command and illustrates the syntax of the command See also the full-size image.

AppendTable Command Editor

AppendTable Command Editor

Command Syntax

The command syntax is as follows:

AppendTable(Parameter="Value",...)

Command Parameters

Parameter                           Description Default          
TableID
required
The identifier for the original table, to which records will be appended. Can be specified using processor ${Property}. None – must be specified.
AppendTableID
required
The identifier for the table from which to append. Can be specified using processor ${Property}. None – must be specified.
IncludeColumns The names of columns to append from AppendTableID, separated by commas. See alsoColumnMap to indicate how to map column names in the append table to the first table (necessary if the column names don’t match). Append all of the columns from AppendTableID that match columns in TableID.
ColumnMap The map of the append table columns to the first table’s columns, necessary when column names are not the same:
AppendColumn1:OriginalColumn1, AppendColumn2:OriginalColumn2
If no map, append table column names in IncludeColumns must have the same name in the first table.
ColumnFilters Filters that limit the number of rows being appended from the append table, using the syntax:
AppendColumn1:FilterPattern1, AppendColumn2:FilterPattern2
Patterns can use * to indicate wildcards for matches. Only string values can be checked (other data types are converted to strings for comparison). Comparisons are case-independent. All patterns must be matched in order to append the row. In the future a command may be added to perform queries on tables, similar to SQL for databases.
No filtering.

Examples

See the automated tests.

The following figures show the input tables and results (modified first table) corresponding to the parameters shown in the editor dialog figure above. Note that the column names for “Table2” have a “2”.

Table Corresponding to TableID in Command Editor

Table Corresponding to TableID in Command Editor

Table Corresponding to AppendTableID in Command Editor

Table Corresponding to AppendTableID in Command Editor

Table Corresponding to Results from Parameters in Command Editor

Table Corresponding to Results from Parameters in Command Editor

Troubleshooting

See the main troubleshooting documentation

See Also