-- ====================================================================
-- A_TASK_HISTORY_SOURCE Table
-- ====================================================================
-- Purpose: Track source data statistics for task history
-- ====================================================================

CREATE TABLE CT_MRDS.A_TASK_HISTORY_SOURCE (
    A_TASK_HISTORY_SOURCE_KEY NUMBER(38,0) NOT NULL ENABLE,
    A_TASK_HISTORY_KEY NUMBER(38,0),
    A_WORKFLOW_HISTORY_SOURCE_KEY NUMBER(38,0),
    SOURCE_NAME VARCHAR2(255 BYTE) COLLATE "USING_NLS_COMP",
    ROW_COUNT NUMBER(38,0)
) TABLESPACE "DATA";

-- Comments
COMMENT ON COLUMN CT_MRDS.A_TASK_HISTORY_SOURCE.A_TASK_HISTORY_SOURCE_KEY IS 'Technical primary key';
COMMENT ON COLUMN CT_MRDS.A_TASK_HISTORY_SOURCE.A_TASK_HISTORY_KEY IS 'Foreign key referencing the subprocess delivering to the target';
COMMENT ON COLUMN CT_MRDS.A_TASK_HISTORY_SOURCE.SOURCE_NAME IS 'Name of the DWH target table written in the load process';
COMMENT ON COLUMN CT_MRDS.A_TASK_HISTORY_SOURCE.ROW_COUNT IS 'Number of rows read from the source during the load process';