Version:

Append RecordsΒΆ

Append (or insert) all records from a source table (specified by input parameter source_table_name) to a particular target table (specified by input parameter table_name). The field map (specified by input parameter field_map) holds the user specified map of target table column names with their mapped source column names.

Input Parameter Description

Name Type Description
table_name string The table name for the records to be appended. Must be an existing table.
source_table_name string The source table name to get records from. Must be an existing table name.
field_map map of string to strings Contains the mapping of column names from the target table (specified by input parameter table_name) as the keys, and corresponding column names from the source table (specified by input parameter source_table_name). Must be existing column names in source table and target table, and their types must be matched.
options map of string to strings

Optional parameters. Default value is an empty map ( {} ).

Supported Parameters (keys) Parameter Description
offset A positive integer indicating the number of initial results to skip from source table (specified by input parameter source_table_name). Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT. Default value is '0'.
limit A positive integer indicating the maximum number of results to be returned from source table (specified by input parameter source_table_name). Or END_OF_SET (-9999) to indicate that the max number of results should be returned. Default value is '-9999'.
expression Optional filter expression to apply to the source table (specified by input parameter source_table_name). Empty by default. Default value is ''.
order_by Comma-separated list of the columns to be sorted from source table (specified by input parameter source_table_name) by; e.g. 'timestamp asc, x desc'. The columns specified must be present in input parameter field_map. If any alias is given for any column name, the alias must be used, rather than the original column name. Default value is ''.
update_on_existing_pk

Specifies the record collision policy for inserting the source table records (specified by input parameter source_table_name) into the target table (specified by input parameter table_name) table with a primary key. If set to true, any existing target table record with primary key values that match those of a source table record being inserted will be replaced by that new record. If set to false, any existing target table record with primary key values that match those of a source table record being inserted will remain unchanged and the new record discarded. If the specified table does not have a primary key, then this option is ignored. Default value is 'false'. The allowed values are:

  • true
  • false

Output Parameter Description

Name Type Description
table_name string