Enabling Load Error Logging - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

Use the --el-enabled flag (or the errorlogging flag inside a map file) to run the Aster Loader Tool in a mode in which it tolerates poorly formatted input rows and logs each bad row to a table. This differs from Aster Loader’s normal mode of running:

  • Running normally, Aster Loader aborts the load immediately if it encounters a bad input row, and it does not log the malformed input row to a table.
  • Running in --el-enabled mode, Aster Loader logs each malformed input row (that is, any row it cannot interpret for loading or cannot load due to datatype mismatch or check constraint violation) to an error table and continues to load the remaining rows in the load job. We refer to this as “error logging.”

The --el-enabled flag is a master flag that operates with a set of sub-flags (--el-discard-errors, --el-errfile, --el-label, --el-limit, --el-schema, and --el-table) that fine-tune your handling of malformed rows. To use any of the sub-flags, you must first have specified the --el-enabled flag. If you’re using a map file, the syntax is different. The master flag is errorlogging, and the sub-flags are discard-errors, errfile, label, limit, schema, and table.

--el-table is not supported on a system running Aster Execution Engine.

The --el-discard-errors flag discards all malformed rows, the --el-label tags failed row data, the --el-limit flag sets a maximum number of allowed failed rows for the job, and the --el-table flag specifies a custom error logging table. See Argument Flags for explanations. See Example with Error Logging for example usage.

To perform error logging, the Aster Loader Tool relies on the error handling features of the Aster Database COPY command in SQL.

If data being loaded will cause duplicate values of a UNIQUE or PRIMARY KEY constraint on the target table, it is considered an error. This particular error cannot be handled by error logging, so the loading transaction will be aborted if any record causes a unique or primary key constraint violation, even when error logging is enabled.