CREATE TABLE `tb_app_hudi_compaction_metrics`
(
    `flink_job_id`              bigint(20) NOT NULL COMMENT 'flink_job_id',
    `alias`                     varchar(50)  DEFAULT NULL COMMENT '表别名',
    `cluster`                   varchar(50)  DEFAULT NULL,
    `application_id`            varchar(50)  DEFAULT NULL,
    `type`                      varchar(10)  DEFAULT NULL COMMENT '类型',
    `source_schema`             varchar(100) DEFAULT NULL COMMENT '库名',
    `source_table`              varchar(100) DEFAULT NULL COMMENT '表名',
    `compaction_plan_instant`   datetime   NOT NULL COMMENT '压缩计划时间点',
    `total_scan_time`           bigint(20)   DEFAULT NULL COMMENT '扫描日志文件时长',
    `total_log_files_compacted` bigint(20)   DEFAULT NULL COMMENT '压缩文件个数',
    `total_log_files_size`      bigint(20)   DEFAULT NULL COMMENT '压缩文件大小',
    `total_records_deleted`     bigint(20)   DEFAULT NULL COMMENT '删除记录数',
    `total_records_updated`     bigint(20)   DEFAULT NULL COMMENT '更新记录数',
    `total_records_compacted`   bigint(20)   DEFAULT NULL COMMENT '压缩记录数',
    `update_time`               datetime   NOT NULL COMMENT '记录更新时间',
    KEY `tb_app_hudi_compaction_metrics_join_index` (`flink_job_id`, `alias`, `application_id`, `compaction_plan_instant`)
) DEFAULT CHARSET = utf8mb4 COMMENT ='压缩计划执行具体指标';
