16.20 - Sending a Multi-Value Step Event - Teradata Ecosystem Manager

Teradata® Ecosystem Manager API Reference

prodname
Teradata Ecosystem Manager
vrm_release
16.20
created_date
December 2020
category
Programming Reference
featnum
B035-3204-107K

STEP events can send events with multiple values for certain parameters. A sendevent uses the tilde (~) character to differentiate between the values in a multi-valued parameter. If there are several steps within an ETL job, such as a Change Data Capture mechanism, a single sendevent can be used to report the removed rows and inserted rows to minimize the sendevent calls.

sendevent --tds TD1 –e SanDiego -r ETL1 -t Load -s ETL1 -w csload080518am --et STEP -u etlroot –d DELETE~INSERT -v 495~21045 --wdb ETL1DB --wtb TargetTable

During processing, the above STEP event is transformed into the following events:

sendevent --tds TD1 –e SanDiego -r ETL1 -t Load -s ETL1 -w csload080518am --et STEP -u etlroot –d DELETE -v 495 --wdb ETL1DB --wtb TargetTable
sendevent --tds TD1 –e SanDiego -r ETL1 -t Load -s ETL1 -w csload080518am --et STEP -u etlroot –d INSERT -v 21045 --wdb ETL1DB --wtb TargetTable

Only the health amount (-v), affected database name (--wdb), affected table name (--wtb), and DML mode (-d) parameters can have multiple values for a STEP event. When sending a multi-valued event, all of the parameters that might contain multiple values must have 0, 1, or n values, where n is a number greater than 1.

sendevent -–tds TD1 –e SanDiego –r ETL1 –t Load –s ETL1 –w csload080518am --et STEP -u etlroot –d INSERT~DELETE~UPDATE -v 21045 --wdb ETL1DB --wtb TargetTable~DeleteTable

For example, when you send an event with m and n values for the parameters defined, as shown above, the sendevent errors out with the following message: Invalid number of parameters passed. All the multi-valued parameters must have the same number of values, or 0 and 1.