Staging Table | Teradata Unity - CDM Staging Tables - Continuous Availability - Teradata Unity

Teradata® Unity™ User Guide

Product
Continuous Availability
Teradata Unity
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2020-09-15
dita:mapPath
fmz1594836948704.ditamap
dita:ditavalPath
qqk1595871525984.ditaval
dita:id
B035-2520
Product Category
Analytical Ecosystem

The staging tables used by CDM Streaming, CDM Multi-Stream, and CDM for CREATE TABLE AS (CTAS) are managed by Unity. They are automatically created in the current user default database, and are automatically dropped when Unity has completed the transaction.

In order to avoid any name collision with user tables, the CDM staging tables use a unique naming convention:
_U<sid>_<tid>_<dbqlid>_<stmtno>_<orderno>_<oid>_ISTG_<tablename>
Where:
  • sid is the Unity primary session ID for the original request.
  • tid is the Unity primary transaction ID for the original request.
  • dbqlid is the DBQL Query ID from the source system for the original request.
  • stmtno is the statement number from the source system for the original request.
  • orderno is the step order number within each statement from the source system for the original request.
  • oid is the Unity dictionary ID of the base table for which this staging table is used.
  • ISTG, DSTG, or TMP are staging table types.
  • tablename is the name of the base table for which this staging table is used.

If Unity is shut down improperly while CDM staging tables are in use, it is possible for some staging tables to remain after the Unity restart. These staging tables can be identified by the above naming convention, and the fact that the associated session has moved passed the associated transaction. If that is the case, the orphaned staging table can be dropped through Unity. This should only be done if you are certain that the staging table is orphaned. Dropping a staging table that is still in use will cause the change data replication to fail on the target system.