Add DDL for log_dataset_instance_load_status
@@ -355,3 +355,26 @@ AUTO_INCREMENT = 0
CREATE INDEX server_cluster USING BTREE
ON stg_dict_dataset_instance(server_cluster, deployment_tier, data_center, slice);
+
+CREATE TABLE `log_dataset_instance_load_status` (
+ `dataset_id` int(11) NOT NULL DEFAULT '0',
+ `db_id` smallint(6) NOT NULL DEFAULT '0',
+ `dataset_type` varchar(30) NOT NULL COMMENT 'hive,teradata,oracle,hdfs...',
+ `dataset_native_name` varchar(200) NOT NULL,
+ `operation_type` varchar(50) DEFAULT NULL COMMENT 'load, merge, compact, update, delete',
+ `partition_grain` varchar(30) NOT NULL DEFAULT '' COMMENT 'snapshot, delta, daily, daily, monthly...',
+ `partition_expr` varchar(500) DEFAULT NULL COMMENT 'partition name or expression',
+ `data_time_expr` varchar(20) NOT NULL COMMENT 'datetime literal of the data datetime',
+ `data_time_epoch` int(11) NOT NULL COMMENT 'epoch second of the data datetime',
+ `record_count` bigint(20) DEFAULT NULL,
+ `size_in_byte` bigint(20) DEFAULT NULL,
+ `log_time_epoch` int(11) NOT NULL COMMENT 'When data is loaded or published',
+ `ref_dataset_type` varchar(30) DEFAULT NULL COMMENT 'Refer to the underlying dataset',
+ `ref_db_id` int(11) DEFAULT NULL COMMENT 'Refer to db of the underlying dataset',
+ `ref_uri` varchar(300) DEFAULT NULL COMMENT 'Table name or HDFS location',
+ `last_modified` timestamp NULL DEFAULT NULL,
+ PRIMARY KEY (`dataset_id`,`db_id`,`partition_grain`,`data_time_epoch`),
+ KEY `dataset_native_name` (`dataset_native_name`,`partition_expr`),
+ KEY `ref_uri` (`ref_uri`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ COMMENT='Capture the events of load/publish operation for dataset';
