ETL jobs, which insert records into the Teradata Database, issues a command similar to the one described. This command sends an event message in each stage before the insert job begins.
sendevent --tds TD1 -e SanDiego -r ETL1 -t Load -s ETL1 -w csload080518am --et START -m ‘start customer load’ --wts ‘2008-05-18 11:35:28’ -u etlroot
The UOW ID is the literal value passed following the -w parameter.
sendevent --tds TD1 –e SanDiego -r ETL1 -t Load -s ETL1 --gt /opt/teradata/sload --et START -m ‘start customer load’ --wts ‘2008-05-18 11:35:28’ -u etlroot
The second command obtains the UOW ID from the file identified after the --gt parameter.
The parameters used in the sendevent command are:
- TDPID (--tds)
- [REQUIRED] The name of the Teradata system from which the event is sent.
- Ecosystem (-e)
- The name of the ecosystem from which the event is sent. This is commonly the name of a data center. It represents all the components that are related to one production Teradata system, including ETL servers, BI servers, and so forth.
- Resource (-r)
- [REQUIRED] The name of the resource that is sending the event. Typically, this is the name of the job that is being run. It can be any type of resource, component, job, or data health check.
- Resource Type (-t)
- [REQUIRED] The type of resource that is sending the event. The resource type is not fixed; however, the default configuration includes the following types:
|BTEQ||Teradata BTEQ job|
|CPUIOWAIT||Percent of CPU used in waiting for IO tasks to complete. Averaged across all logical cores.|
|CPUIRQ||Percent of CPU used to service hardware interrupts. Averaged across all logical cores.|
|CPUNICE||Percent of CPU used to execute lower-priority processes. Averaged across all logical cores.|
|CPUSOFTIRQ||Percent of CPU used to service software interrupts. Averaged across all logical cores.|
|CPUSTOLEN||Percent of CPU used is taken away from an executing process and flagged as able to be run. Typically, a non-zero in virtual machines that share CPU. Averaged across all logical cores.|
|CPUSYSTEM||Percent of CPU used in kernel mode. Averaged across all logical cores.|
|CPUUSAGEPCT||Percent of CPU used on the system. Averaged across all logical cores.|
|CPUUSER||Percent of CPU used in user mode. Averaged across all logical cores.|
|DATAPUMP||Data Pump job|
|DISKFREE [path]||Amount of free bytes on the physical disk|
|DISKFREEBYTES [path]||Amount of physical disk free in bytes|
|DISKREADRATE [path]||Amount of physical disk reads in bytes per second|
|DISKREADS [path]||Number of physical disk reads per second|
|DISKTOTALBYTES [path]||Total size of the physical disk in bytes|
|DISKUSEDBYTES [path]||Amount of physical disk used in bytes|
|DISKWRITERATE [path]||Amount of physical disk writes in bytes per second|
|DISKWRITES [path]||Number of physical disk writes per second|
|FEXP||Teradata FastExport job|
|FREEDISK||Available free disk space on disk 1|
|FREEDISK2||Available free disk space on disk 2|
|FREEDISK3||Available free disk space on disk 3|
|FREEDISK4||Available free disk space on disk 4|
|FREEMEMORY||Available free memory on a system|
|FREESWAP||Available swap space on a system|
|JOB||Any job name|
|LAGTIME||Amount of lag time allowed for a given extract or replicate|
|LOAD||Generic load job|
|MEMFREEBYTES||Amount of physical memory free on the system in bytes|
|MEMFREEPERCENT||Percent of physical memory free on the system|
|MEMTOTALBYTES||Total size of physical memory on the system in bytes|
|MEMUSEDBYTES||Amount of physical memory used on the system in bytes|
|NETRECEIVERATE [interface]||Average rate in bytes per second received through the specified network interface on the system|
|NETSPEED [interface]||Maximum speed of the network interface|
|NETTANSMITXRATE [interface]||Average rate in bytes per second sent through the specified network interface on the system|
|NETUSAGEPCT [interface]||Percentage used of the network interface on the system|
|OLELOAD||OLE load job|
|PROCESS||Any job name|
|PURGE||BAR purge job|
|QUEUEDEPTH||Depth of any queue that is being monitored|
|RESTORE||Restore job (BAR)|
|ROWCOUNT||Row count validation|
|TABLECOPY||Table Copy job|
|THROUGHPUT||Throughput for a job|
|TRANSFORM||Generic transformation job|
|USEDDISK [path]||Percent of physical disk used on the system|
|USEDMEMORY||Percent of physical memory used on the system|
- System Identifier (-s)
- Describes the system from which the event is sent.
- Unit of Work Identifier (-w)
- [REQUIRED unless --gt is specified]
- The common UOW ID that is used to group all events for this unit of work. START and END events require a UOW ID. The maximum length is 30 characters. You can write the UOW ID to a filename to be used later by adding the --gt command:
-w <uowid> --gt < filename > sendevent sends an event using the UOW ID specified by the -w flag, and writes the UOW ID to the filename specified by the --gt flag.
- Get Unit of Work Identifier (--gt <filename>)
- [REQUIRED if no -w is specified]
sendevent sends the UOW ID found in the <filename> specified.
- Message (-m)
- A message included with the event for reporting purposes.
- Unit of Work Timestamp (--wts)
- The unit of work time stamp. Reflects the freshness of data contained within the unit of work. For example, UOWId SalesData20080502 contains sales data extract as of May 02, 2015.
This time stamp is used to determine job latency across ecosystems. When job schedules are used, this time stamp falls between the start and end time stamp of the corresponding data cycle to mark the data cycle as completed.
When it is not specified, a unit of work time stamp defaults to the event time stamp of the first event where the specific unit of work appears.
- User Identifier (-u)
- A unique identifier for the user of the system. This is not necessarily the same as the system login username.