To extract LOB data from database tables and write LOB data to an external target, the Teradata PT script must use:
- The SQL Selector operator (to extract LOB data from a source table)
- The DataConnector operator (to write on an external target)
The LOB columns must be defined accordingly to their data content as BLOB (lengthBytes) AS DEFERRED BY NAME or CLOB (lengthBytes) AS DEFERRED BY NAME in the schema.
The job produces the following outcomes:
- LOB data files located under the directory specified in the LobDirectoryPath attribute or under the current working directory if there is no value specified for the LobDirectoryPath attribute. For the file name formula, see Using the Deferred Method.
- An external data file whose name is specified in the FileName attribute. Data records written to the file contain non-LOB data and LOB file locators that identify the files containing the LOB data. These LOB file locators have the same format as VARCHAR columns and contain the file names of the LOB data files produced by the SQL Selector operator.
For a sample Teradata PT script in the <install-directory>/sample/userguide directory, see PST00021.txt.