To perform only retain transformations, use the following syntax. To perform more than one kind of transformation on the same input table, see Syntax.
CALL td_analyze ( 'vartran', 'database = input_database_name; tablename = input_table_name; [ optional_parameter; [...] ] retain_transformation' );
- optional_parameter
{ fallback = { true | false } | gensqlonly = { true | false } | index = column_name [,...] | indexunique = { true | false } | lockingclause = SQL_LOCKING_clause | multiset = { true | false } | noindex = { true | false } | nullstyle = null_style | outputdatabase = output_database_name | outputstyle = { select | table | view | volatile } | outputtablename = output_table_name | overwrite = { true | false } | whereclause = SQL_WHERE_clause }
- retain_transformation
retain = { transformation | { transformation } ... };
You must type the colored or bold braces.- transformation
columns (column_spec [,...])
- column_spec
column_name[/transformed_column_name]... [, datatype (data_type) ]
Syntax Elements
- database
- The database containing the input table.
- tablename
- The input table from which to build a predictive model.
- fallback
- [Optional] Whether to create a mirrored copy of the output table in Analytics Database when outputstyle=table.
- gensqlonly
- [Optional] True returns the SQL for the function as a result set but does not run it.
- index
- [Optional] The index column or columns to include in the output table if outputstyle=table or outputstyle=volatile.
- indexunique
- [Optional] Whether to include a unique primary index in the output table when outputstyle=table or outputstyle=volatile.
- lockingclause
- [Optional] The LOCKING clause to include in the generated SQL. Example:
LOCKING mydb.mytable FOR ACCESS;
- multiset
- [Optional] Whether the output table can contain duplicate rows when outputstyle=table or outputstyle=volatile.
- noindex
- [Optional] Whether the output table contains no index columns (NOPI) when outputstyle=table or outputstyle=volatile.
- nullstyle
- [Optional] A null_style and its parameters, if any, from the following table.
- outputdatabase
- [Optional] The database containing the resulting output table when outputstyle=table or outputstyle=view.
- outputstyle
- [Optional]
Option Description select (default) Function outputs SELECT statement. table Function outputs table. view Function outputs view. volatile Function outputs volatile table. - outputtablename
- [Optional] The name of the output table when outputstyle=table, outputstyle=view, or outputstyle=volatile.
- overwrite
- [Optional] Whether to drop the output tables before creating new ones.
- whereclause
- [Optional] The expression in the SQL WHERE clause to include in the generated SQL to filter rows selected for analysis.
- columns
- The input table column or columns to transform.
- datatype
- [Optional] The output data type, a datatype from the following table, which the function casts to the equivalent SQL format if it is compatible with the transformed data.
datatype SQL Format DATATYPE(BIGINT) BIGINT DATATYPE(BYTEINT) BYTEINT DATATYPE(CHAR,n) CHAR(n) DATATYPE(DATE) DATE DATATYPE(DECIMAL,m,n) DECIMAL(m,n) DATATYPE(FLOAT) FLOAT DATATYPE(INTEGER) INTEGER DATATYPE(NUMBER) NUMBER(*) DATATYPE(NUMBER,n) NUMBER(n) DATATYPE(NUMBER,*,n) NUMBER(*,n) DATATYPE(NUMBER,n,n) NUMBER(n,n) DATATYPE(SMALLINT) SMALLINT DATATYPE(TIME,p) TIME(p) DATATYPE(TIMESTAMP,p) TIMESTAMP(p) DATATYPE(VARCHAR,n) VARCHAR(n)