APPLY Table Operator Arguments - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Required Arguments

apply_command
Specifies the command or script to run.
script_name
Specifies the name of the user script.
'Rscript --vanilla ..' helps user to run R script without saving or restoring anything in the process and keep things clean.
files_local_path
Specifies the absolute local path where user script and all supporting files like model files, input data file reside.
env_name
Specifies the name of the remote user environment or an object of class UserEnv.

Optional Arguments

returns
Specifies output column definition.
When this argument is not specified, data argument is required, and output column definition must match with column definition of table specified in the data argument.
data
Specifies a teradataml DataFrame containing the input data for the script.
data_hash_column
Specifies the column to be used for hashing.
The rows in the input data are redistributed to AMPs based on the hash value of the column specified.
If there is no data_hash_column, then the entire result set, delivered by the function, constitutes a single group or partition.
data_hash_column can not be specified with data_partition_column, is_local_order and data_order_column.
data_partition_column
Specifies Partition By columns for data.
Values to this argument can be provided as a list, if multiple columns are used for partition.
If there is no data_partition_column, then the entire result set delivered by the function, constitutes a single group or partition.
  • data_partition_column cannot be specified with data_hash_column.
  • data_partition_column cannot be specified with "is_local_order = True".
is_local_order
Specifies a boolean value to determine whether the input data is to be ordered locally or not. sort_ascending specifies the order in which the values in a group, or partition, are sorted.
Default value is 'False'. When set to 'True', qualified rows are ordered locally in preparation to be input to the function.
If data_order_column is None, this argument is ignored.
  • is_local_order can not be specified with data_hash_column.
  • When is_local_order is set to 'True', data_order_column must be specified, and the columns specified in data_order_column are used for local ordering.
data_order_column
Specifies the Order By column for data, and can be used no matter is_local_order is set to 'True' or 'False'.
Values to this argument can be provided as a list, if multiple columns are used for ordering.
data_order_column can not be specified with data_hash_column.
sort_ascending
Specifies a boolean value to determine if the result set is to be sorted on the data_order_column column in ascending or descending order:
  • When set to 'True', data is sorted in ascending order.

    This is the default value.

  • When set to 'False', data is sorted in descending order.
This argument is ignored, if data_order_column is None.
nulls_first
Specifies a boolean value to determine whether NULLS are listed first or last during ordering.
NULLS are listed first when this argument is set to default value 'True', and listed last when set to 'False'.
This argument is ignored, if data_order_column is None.
delimiter
Specifies a delimiter to use when reading columns from a row and writing result columns. Delimiter must be a valid Unicode code point.
The default value is comma (,).
  • This argument cannot be the same as quotechar argument.
  • This argument cannot be an empty string, newline and carriage return.'.
quotechar
Specifies the character used to quote all input and output values for the script. Default value is double quote(").
This argument cannot be the same as delimiter argument.
style
Specifies how input is passed to and output is generated by the apply_command respectively. Default value is 'csv', and this is the only value supported for APPLY.