TSL_Attach function
The TSL_Attach function opens a database session for loading data.
Syntax
TSL_Attach(
table_name varchar(128),
column_name varchar(128),
reject_file varchar(255) default NULL)
returns lvarchar
TSL_Attach(
table_name varchar(128),
column_name varchar(128),
returns lvarchar
- table_name
- The name of the time series table. Must not contain uppercase letters. Must match the table name supplied to the TSL_Init function to initialize the loader session.
- column_name
- The name of the TimeSeries column. Must not contain uppercase letters. Must match the column name supplied to the TSL_Init function to initialize the loader session.
- reject_file (optional)
- The path and file name for storing records that were not applied. For example, records with an incorrect number of fields or a formatting error are not applied. By default, only the number of rejected records is recorded. Overwrites the reject file specified in the TSL_Init function.
Usage
Use the TSL_Attach function to open an additional database session to load time series data in parallel. You must run the TSL_Attach function in the context of a loader session that was initialized by the TSL_Init function.
Returns
- A session handle that consists of a table name and a TimeSeries column name.
- An exception or NULL if the session was not initialized.
Example
The following statement opens a database session for the table ts_data and the TimeSeries column raw_reads:
EXECUTE FUNCTION TSL_Attach('ts_data','raw_reads');