文档

元数据仓库共享模型(Hadoop)

更新时间:

本文为您介绍Hadoop计算引擎下提供的元数据共享模型详情。

概述

为了支持更灵活的数据分析及二次开发,需要使用Dataphin的元数据信息。Dataphin以元数据共享模型的方式将系统元数据对外开放。元数据共享模型的使用方式请参见元数据仓库共享模型概述

版本变动详情

版本

变动内容

v3.14

  • 新增告警事件表fct_dataphin_monitor_alert_event_di。

  • 新增告警推送记录表fct_dataphin_monitor_alert_notification_di。

  • 新增质量监控对象告警配置表dim_dataphin_dp_quality_watch_alert。

  • 安全识别记录表dim_dataphin_security_label新增record_from、field_from字段。

v3.13

  • 新增运维监控配置表dim_dataphin_monitored_rule。

  • 新增基线监控对象表dim_dataphin_baseline_object。

  • 新增集成任务节点运行实例统计信息表fct_dataphin_dlink_node_taskrun_step_metric_di。

  • 逻辑表dim_dataphin_model新增ops_owner_id、ops_owner_name、dev_owner_id、dev_owner_name、physical_data_size字段。

  • 数据源表dim_dataphin_data_source数据源编码字段data_source_catalog。

v3.12

  • 数据标准表dim_dataphin_datastandard_standard新增standard_template_id、standard_template_name、standard_template_reference字段。

  • 数据标准规则表dim_dataphin_datastandard_rule新增standard_template_id、standard_template_name、standard_set_ids字段,废弃standard_set_id、standard_set_name字段。

  • 数据标准与资产映射结果表dim_dataphin_datastandard_asset_relation新增standard_template_id、standard_template_name字段。

  • 数据安全打标结果表dim_dataphin_security_label新增classfy_parent_path、classfy_level1_path 字段。

  • 数据服务调用次数统计表dws_dataphin_service_api_mi新增api_ex_count字段。

v3.11

  • 物理表dim_dataphin_table 新增is_external_table、schema_name字段。

  • 新增项目用户表dim_dataphin_project_user。

  • 安全分类表dim_dataphin_security_classify新增status、level_id、level_name、level_index、parent_path字段。

  • 安全识别规则表dim_dataphin_security_identify_rule新增classify_ids字段,废弃部分字段,详见表字段注释。

  • 安全脱敏规则表dim_dataphin_security_desensitize_rule新增classify_id、classify_name字段,废弃部分字段,详见表字段注释。

  • 安全脱敏规则白名单表dim_dataphin_security_desensitize_rule_white_list新增classify_id、classify_name字段,废弃部分字段,详见表字段注释。

  • 标准落标规则与资产映射表dim_dataphin_datastandard_rule_asset_relation新增job_type。

  • 新增标准与资产映射结果表dim_dataphin_datastandard_asset_relation,后续落标结果建议使用该表。

v3.10

  • 血缘数据dim_dataphin_lineage_node_table/dim_dataphin_lineage_table,添加实时表的血缘数据。

  • 租户用户表dim_dataphin_tenant_user 新增user_status、system_role_list字段, 添加项目的生成账号的数据。

  • 新增数据源配置信息表dim_dataphin_data_source_config。

  • 新增实时元表和元表字段:dim_dataphin_stream_table/dim_dataphin_stream_column。

  • 质量规则表dim_dataphin_dp_quality_rule新增archive_mode、archive_store_type、archive_table_name字段。

  • 新增质量监控对应负责人表dim_dataphin_dp_quality_watch_member。

v3.9

  • 数据标准表dim_dataphin_datastandard_standard新增monitor_config字段。

  • 质量规则表dim_dataphin_dp_quality_rule新增tag、tag_unique_key、tag_properties字段。

  • 质量规则任务表fct_dataphin_dp_quality_rule_task_di新增tag、tag_unique_key字段。

v3.8

  • dim_dataphin_column/dim_dataphin_field新增数据分类和安全等级字段。

  • dim_dataphin_datastandard_rule_asset_relation新增标准落标状态。

v3.7

  • 新增质量模块数据,包括质量监控对象表dim_dataphin_dp_quality_watch、质量规则表dim_dataphin_dp_quality_rule、质量规则任务表fct_dataphin_dp_quality_rule_task_di。

  • 物理运维模块,新增物理调度节点依赖关系表表dim_dataphin_node_edge、物理调度实例依赖关系表fct_dataphin_node_task_link_di。

  • 数据服务模块,除dws_dataphin_service_api_mi表外,其余表新增proj_id/proj_name字段。

  • dim_datpahin_data_domain表新增5级数据域字段。

  • 新增数据标准模块,包括数据标准表dim_dataphin_datastandard_standard、落标规则表dim_dataphin_datastandard_rule、标准落标规则与资产映射表dim_dataphin_datastandard_rule_asset_relation。

v3.5.4

  • dim_dataphin_atom_index表新增period_type字段,同时该表主键变更为atom_index_id+period_type+env。

  • dim_dataphin_derived_index表新增period_type/compute_type字段,同时该表主键变更为derived_index_id+period_type+env。

v3.3.1-hf3

新增dim_dataphin_service_api_param数据服务API参数表。

v3.2.4~

dim_dataphin_physical_index和dim_dataphin_index_catalog表废弃,原因是上挂物理指标在3.2.4版本后合并至dim_dataphin_derived_index表。

添加建模/物理运维中关于status字段的详细注释信息。

  • 新增文档。

  • 所有table_id,column_id相关字段全部废弃,置空。

Dataphin元数据仓库目录

分类

二级分类

表名称

表中文名称

对应通信表

规范建模

规划

dim_dataphin_biz_unit

业务板块表

data_share_finish

dim_dataphin_data_domain

数据域表

dim_dataphin_time_period

统计周期表

建模

dim_dataphin_dimension

维度定义表

dim_dataphin_biz_process

业务过程表

dim_dataphin_atom_index

原子指标表

dim_dataphin_adjunct_word

业务限定表

dim_dataphin_derived_index

派生指标表

dim_dataphin_model

逻辑表元数据

dim_dataphin_field

逻辑表字段元数据

研发与运维

物理运维

dim_dataphin_node

物理调度节点

data_share_finish

dim_dataphin_datax_node

datax类型-物理调度节点

dim_dataphin_dlink_node

dlink类型-物理调度节点

fct_dataphin_node_taskrun_di

物理节点调度实例运行事实

dim_dataphin_node_edge

物理调度节点依赖关系表

fct_dataphin_node_task_link_di

物理调度实例依赖关系表

dim_dataphin_monitored_rule

运维监控配置表

fct_dataphin_dlink_node_taskrun_step_metric_di

集成任务节点运行实例统计信息表

fct_dataphin_monitor_alert_event_di

告警事件表

fct_dataphin_monitor_alert_notification_di

警推送记录表

逻辑运维

dim_dataphin_model_node

逻辑表调度节点

fct_dataphin_model_node_task_di

逻辑表调度实例

OS

fct_dataphin_os_task_table_inputoutput_di

通过SQL访问表事务型事实表(粒度:执行任务ID + 输入表ID + 输入环境 + 输出表ID + 输出环境)

基线

dim_dataphin_baseline_object

基线监控对象表

公共

用户

dim_dataphin_tenant_user

租户用户表

data_share_finish

dim_dataphin_project_user

项目用户表

项目

dim_dataphin_project

项目空间表

dim_dataphin_project_compute_engine

项目空间与计算引擎绑定关系表

数据源

dim_dataphin_data_source

数据源表

dim_dataphin_data_source_config

数据源配置表

数据资产

物理表

dim_dataphin_table

物理表

data_share_finish

dim_dataphin_column

物理表字段

dim_dataphin_table_partition

物理表分区

数据服务

dim_dataphin_service_logic_unit

已上线数据服务单元表

data_service_finish

dim_dataphin_service_api

已上线数据服务API表

dim_dataphin_service_api_direct

已上线直连数据源服务API表

dim_dataphin_service_app

APP表

dim_dataphin_service_logic_unit_column

已上线服务单元字段表

dim_dataphin_service_app_api

APP与API对应关系表

dws_dataphin_service_api_mi

数据服务API调用分钟级别汇总表

dim_dataphin_service_api_param

已上线API的参数表

血缘

dim_dataphin_lineage_node_column

粒度血缘关系(节点+输入表+输入字段+输出表+输出字段 )

data_share_finish

dim_dataphin_lineage_node_table

粒度血缘关系(节点+输入表+输出表)

dim_dataphin_lineage_table

粒度血缘关系(输入表+输出表)

安全

dim_dataphin_security_label

安全识别记录表

data_security_finish

dim_dataphin_security_classify

安全数据分类表

dim_dataphin_security_level

安全数据分级表

dim_dataphin_security_identify_rule

安全识别规则表

dim_dataphin_security_desensitize_rule

安全脱敏规则表

dim_dataphin_security_desensitize_rule_white_list

安全脱敏规则白名单表

质量

dim_dataphin_dp_quality_watch

质量监控对象表

data_quality_finish

dim_dataphin_dp_quality_rule

质量规则表

fct_dataphin_dp_quality_rule_task_di

质量规则任务表

dim_dataphin_dp_quality_watch_member

质量监控对象负责人表

dim_dataphin_dp_quality_watch_alert

质量监控对象告警配置表

标准

dim_dataphin_datastandard_standard

标准表

data_standard_finish

dim_dataphin_datastandard_rule

标准落标规则表

dim_dataphin_datastandard_rule_asset_relation

标准落标规则与资产映射表

dim_dataphin_datastandard_asset_relation

标准与资产映射结果表

实时

dim_dataphin_stream_table

实时元表元数据

dim_dataphin_stream_column

实时元表字段元数据

通信表目录

通信表是整个模块中所有表的最后一个表。如果通信表产出,则模块中的所有表当天的数据都已产出完成。

表名称

表中文名称

data_share_finish

基础共享模型通信表

data_security_finish

数据安全模块共享模型通信表

data_service_finish

数据服务模块共享模型通信表

data_quality_finish

数据质量模块共享模型通信表

data_standard_finish

数据标准模块共享模型通信表

规范建模

规划

dim_dataphin_biz_unit

create table if not exists dim_dataphin_biz_unit(
	tenant_id 							bigint comment '租户id',
	biz_unit_id 						bigint comment '业务板块ID',
	biz_unit_name 					string comment '业务板块名称',
	biz_unit_name_cn 				string comment '业务板块中文名称',
  biz_unit_desc						string comment '业务板块描述',
  is_basic_biz						string comment '是否bisic板块,Y/N',
  biz_unit_spec						string comment '板块类别,datadev:数据研发,distill:数据萃取',
  env											string comment '板块环境,PROD:生产环境',
	owner_id								string comment '业务板块所有者ID',
  owner_name							string comment '业务板块所有者名称',
  modifier_id							string comment '最近一次修改者ID',
  modifier_name						string comment '最近一次修改者名称',
  gmt_create 							string comment '创建时间',
	gmt_modified 						string comment '修改时间'
) comment '业务板块表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_data_domain

create table if not exists dim_dataphin_data_domain(
  tenant_id                                bigint comment '租户id',
  data_domain_id                           bigint comment '数据域ID',
  data_domain_name                         string comment '数据域名称',
  data_domain_abbreviation                 string comment '数据域缩写',
  data_domain_name_cn                      string comment '数据域中文名称', 
  data_domain_desc                         string comment '数据域描述',
  biz_unit_id                              bigint comment '业务板块ID',
  biz_unit_name                            string comment '业务板块名称',
  owner_id                                 string comment '所有者ID',
  owner_name                               string comment '所有者名称',
  modifier_id                              string comment '最近一次修改者ID',
  modifier_name                            string comment '最近一次修改者名称',
  gmt_create                               string comment '创建时间',
  gmt_modified                             string comment '修改时间',
  data_domain_level                        bigint comment '数据域层级',
  parent_data_domain_id                    bigint comment '父数据域ID',
  parent_data_domain_name                  string comment '父数据域名称',
  parent_data_domain_level1_abbreviation   string comment '父级数据域缩写',
  parent_data_domain_level1_name_cn        string comment '父级数据域中文名称', 
  data_domain_level1_id                    bigint comment '一级数据域ID',
  data_domain_level1_name                  string comment '一级数据域名称',
  data_domain_level1_abbreviation          string comment '一级数据域缩写',
  data_domain_level1_name_cn               string comment '一级数据域中文名称', 
  data_domain_level2_id                    bigint comment '二级数据域ID',
  data_domain_level2_name                  string comment '二级数据域名称',
  data_domain_level2_abbreviation          string comment '二级数据域缩写',
  data_domain_level2_name_cn               string comment '二级数据域中文名称', 
  data_domain_level3_id                    bigint comment '三级数据域ID',
  data_domain_level3_name                  string comment '三级数据域名称',
  data_domain_level3_abbreviation          string comment '三级数据域缩写',
  data_domain_level3_name_cn               string comment '三级数据域中文名称', 
  data_domain_level4_id                    bigint comment '四级数据域ID',
  data_domain_level4_name                  string comment '四级数据域名称',
  data_domain_level4_abbreviation          string comment '四级数据域缩写',
  data_domain_level4_name_cn               string comment '四级数据域中文名称', 
  data_domain_level5_id                    bigint comment '五级数据域ID',
  data_domain_level5_name                  string comment '五级数据域名称',
  data_domain_level5_abbreviation          string comment '五级数据域缩写',
  data_domain_level5_name_cn               string comment '五级数据域中文名称'
) comment '数据域表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_time_period

create table if not exists dim_dataphin_time_period(
	tenant_id 								bigint comment '租户id',
	time_period_id 						bigint comment '统计周期ID',
	time_period_name 					string comment '统计周期名称',
  time_period_name_cn				string comment '统计周期中文名称',
  time_period_desc					string comment '统计周期描述',
  period_start							string comment '周期开始日期',
  period_end								string comment '周期结束日期',
  --env                       string comment '环境,PROD:生产环境',
  owner_id									string comment '所有者ID',
  owner_name								string comment '所有者名称',
  modifier_id								string comment '最近一次修改者ID',
  modifier_name							string comment '最近一次修改者名称',
  gmt_create 								string comment '创建时间',
	gmt_modified 							string comment '修改时间'
) comment '统计周期表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

建模

dim_dataphin_dimension

create table if not exists dim_dataphin_dimension(
	tenant_id 								bigint comment '租户id',
	dimension_id							bigint comment '维度ID',
	dimension_name						string comment '维度名称',
	dimension_name_cn					string comment '维度中文名',
	dimension_desc						string comment '维度描述',
	dimension_type						string comment '维度类型 NORMAL/ENUM/VIRTUAL/LEVEL',
	dimension_pk							string comment '维度主键',
	dimension_pk_cn						string comment '维度主键中文名',
	dimension_pk_datatype			string comment '主键数据类型',
	dimension_pk_logic				string comment '维度主键逻辑',
	dimension_status					string comment '状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
	parent_dimension_id				string comment '父维度ID',
	parent_dimension_name			string comment '父维度名称',
	parent_dimension_name_cn	string comment '父维度中文名',
	dimension_lifecycle				string comment '生命周期',
	data_domain_id						bigint comment '数据域ID',
	data_domain_name					string comment '数据域名称',
	data_domain_abbreviation	string comment '数据域简称',
	data_domain_name_cn				string comment '数据域中文名',
	project_id								bigint comment '项目空间ID',
	project_name							string comment '项目空间名称',
	biz_unit_id								bigint comment '业务板块ID',
	biz_unit_name							string comment '业务板块名称',
  env                       string comment '环境,DEV:开发环境,PROD:生产环境',
  owner_id									string comment '所有者ID',
  owner_name								string comment '所有者名称',
  modifier_id								string comment '最近一次修改者ID',
  modifier_name							string comment '最近一次修改者名称',
  gmt_create 								string comment '创建时间',
	gmt_modified 							string comment '修改时间'
) comment '维度表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_biz_process

create table if not exists dim_dataphin_biz_process(
	tenant_id 								bigint comment '租户id',
	biz_process_id						bigint comment '业务过程ID',
	biz_process_name					string comment '业务过程名称',
	biz_process_name_cn				string comment '业务过程中文名',
	biz_process_desc					string comment '业务过程描述',
	data_domain_id						bigint comment '数据域ID',
	data_domain_name					string comment '数据域名称',
	data_domain_abbreviation	string comment '数据域简称',
	data_domain_name_cn				string comment '数据域中文名',
	project_id								bigint comment '项目空间ID',
	project_name							string comment '项目空间名称',
	biz_unit_id								bigint comment '业务板块ID',
	biz_unit_name							string comment '业务板块名称',
  env                       string comment '环境,DEV:开发环境,PROD:生产环境',
  owner_id									string comment '所有者ID',
  owner_name								string comment '所有者名称',
  modifier_id								string comment '最近一次修改者ID',
  modifier_name							string comment '最近一次修改者名称',
  gmt_create 								string comment '创建时间',
	gmt_modified 							string comment '修改时间'
) comment '业务过程表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_atom_index

说明

针对衍生原子指标,计算逻辑atom_index_logic中涉及到的原子指标,以“@原子指标ID”的形式表示,如果需要还原初始计算逻辑,可以通过原子指标ID关联查询。

create table if not exists dim_dataphin_atom_index(
	tenant_id 								bigint comment '租户id',
  atom_index_id							bigint comment '原子指标ID',
	atom_index_name						string comment '原子指标名称',
	atom_index_name_cn				string comment '原子指标中文名',
	atom_index_desc						string comment '原子指标描述',
	atom_index_type						string comment '原子指标类型,NORMAL:普通原子指标,COMPOSITE:衍生原子指标',
	atom_index_data_type			string comment '原子指标数据类型',
	atom_index_logic					string comment '原子指标计算逻辑',
	atom_index_status					string comment '原子指标状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
	is_acc_sum								string comment '是否可累加,Y/N',
	source_path_attribute			string comment '主要来源字段',
	time_col_attribute_id			bigint comment '统计周期字段ID',
	time_col_attribute_name		string comment '统计周期字段名称',
	time_col_format						string comment '统计周期格式',
  is_comp_atom_index				string comment '是否衍生原子指标,Y/N',
  comp_atom_index_ids				string comment '原子指标ID串,以分号分隔',
  comp_atom_index_names		  string comment '原子指标名称串,以分号分隔',
	model_id									bigint comment '逻辑表ID',
	model_type								string comment '逻辑表类型,FCT:事实逻辑表,DIM:维度逻辑表',
	model_name								string comment '逻辑表名称',
	model_name_cn							string comment '逻辑表中文名',
	biz_process_id						bigint comment '业务过程ID',
	biz_process_name					string comment '业务过程名称',
	biz_process_name_cn				string comment '业务过程中文名',
	data_domain_id						bigint comment '数据域ID',
	data_domain_name					string comment '数据域名称',
	data_domain_abbreviation	string comment '数据域简称',
	data_domain_name_cn				string comment '数据域中文名',
	project_id								bigint comment '项目空间ID',
	project_name							string comment '项目空间名称',
	biz_unit_id								bigint comment '业务板块ID',
	biz_unit_name							string comment '业务板块名称',
  env                       string comment '环境,DEV:开发环境,PROD:生产环境',
  owner_id									string comment '所有者ID',
  owner_name								string comment '所有者名称',
  modifier_id								string comment '最近一次修改者ID',
  modifier_name							string comment '最近一次修改者名称',
  gmt_create 								string comment '创建时间',
	gmt_modified 							string comment '修改时间',
  period_type               string comment '统计粒度,DAY:天,HOUR:小时,MINUTE:分钟,STREAMING:实时'
) comment '原子指标表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_adjunct_word

create table if not exists dim_dataphin_adjunct_word(
	tenant_id 								bigint comment '租户id',
	adjunct_word_id						bigint comment '业务限定ID',
	adjunct_word_name					string comment '业务限定名称',
	adjunct_word_name_cn			string comment '业务限定中文名',
	adjunct_word_desc					string comment '业务限定描述',
	adjunct_word_logic				string comment '业务限定逻辑',
	adjunct_word_status				string comment '业务限定状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
	source_path_attribute			string comment '主要来源字段',
	model_id									bigint comment '逻辑表ID',
	model_type								string comment '逻辑表类型,FCT:事实逻辑表,DIM:维度逻辑表',
	model_name								string comment '逻辑表名称',
	model_name_cn							string comment '逻辑表中文名',
	biz_process_id						bigint comment '业务过程ID',
	biz_process_name					string comment '业务过程名称',
	biz_process_name_cn				string comment '业务过程中文名',
	data_domain_id						bigint comment '数据域ID',
	data_domain_name					string comment '数据域名称',
	data_domain_abbreviation	string comment '数据域简称',
	data_domain_name_cn				string comment '数据域中文名',
	project_id								bigint comment '项目空间ID',
	project_name							string comment '项目空间名称',
	biz_unit_id								bigint comment '业务板块ID',
	biz_unit_name							string comment '业务板块名称',
  env                       string comment '环境,DEV:开发环境,PROD:生产环境',
  owner_id									string comment '所有者ID',
  owner_name								string comment '所有者名称',
  modifier_id								string comment '最近一次修改者ID',
  modifier_name							string comment '最近一次修改者名称',
  gmt_create 								string comment '创建时间',
	gmt_modified 							string comment '修改时间'
) comment '业务限定表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_derived_index

create table if not exists dim_dataphin_derived_index(
	tenant_id 											bigint comment '租户id',
  derived_index_id								bigint comment '派生指标ID',
	derived_index_name							string comment '派生指标名称',
	derived_index_name_cn						string comment '派生指标中文名',
	derived_index_desc							string comment '派生指标描述',
	derived_index_data_type					string comment '派生指标数据类型',
	derived_index_status						string comment '派生指标状态',
  derived_index_logic							string comment '派生指标逻辑',
  atom_index_id										bigint comment '原子指标ID',
	atom_index_name									string comment '原子指标名称',
	atom_index_name_cn							string comment '原子指标中文名',
	atom_index_type									string comment '原子指标类型,NORMAL:普通原子指标,COMPOSITE:合成原子指标',
	atom_index_data_type						string comment '原子指标数据类型',
	atom_index_logic								string comment '原子指标计算逻辑',
	atom_index_status								string comment '原子指标状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
	atom_source_path_attribute			string comment '主要来源字段',
 	adjunct_word_id									bigint comment '业务限定ID',
	adjunct_word_name								string comment '业务限定名称',
	adjunct_word_name_cn						string comment '业务限定中文名',
	adjunct_word_desc								string comment '业务限定描述',
	adjunct_word_logic							string comment '业务限定逻辑',
	adjunct_word_status							string comment '业务限定状态',
	adjunct_word_source_path_attribute						string comment '主要来源字段',
	time_period_id 									bigint comment '统计周期ID',
	time_period_name 								string comment '统计周期名称',
  time_period_name_cn							string comment '统计周期中文名称',
 	granularity_id									bigint comment '统计粒度ID',
	granularity_name								string comment '统计粒度名称',
	granularity_name_cn							string comment '统计粒度中文名',
	dimension_ids										string comment '维度ID串,以分号分隔',
	dimension_names									string comment '维度名称串,以分号分隔',
	dimension_name_cns							string comment '维度中文名称串,以分号分隔',
	summary_id											bigint comment '统计粒度对应汇总表ID',
	summary_name										string comment '统计粒度对应汇总表名称',
	summary_name_cn									string comment '统计粒度对应汇总表中文名称', 
	biz_process_id									bigint comment '业务过程ID',
	biz_process_name								string comment '业务过程名称',
	biz_process_name_cn							string comment '业务过程中文名',
	data_domain_id									bigint comment '数据域ID',
	data_domain_name								string comment '数据域名称',
	data_domain_abbreviation				string comment '数据域简称',
	data_domain_name_cn							string comment '数据域中文名',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
  env                       			string comment '环境,DEV:开发环境,PROD:生产环境',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											string comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间',
  period_type                 		string comment '统计粒度,DAY:天,HOUR:小时,MINUTE:分钟,STREAMING:实时',
  compute_type                 		string comment '计算类型,AUTO:派生指标,COMBINE:衍生指标,CUSTOM:专家编码,MOUNT:外部注册'
) comment '派生指标'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_model

create table if not exists dim_dataphin_model(
	tenant_id 											bigint comment '租户id',
  model_id												bigint comment '逻辑表ID',
  model_name											string comment '逻辑表名',
  model_name_cn										string comment '逻辑表中文名',
  model_desc											string comment '逻辑表描述',
  model_status										string comment '逻辑表状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
  model_type											string comment '逻辑表类型,DIM:维度逻辑表,FACT:事实逻辑表,SUM:汇总逻辑表,VIEW:逻辑视图',
	env															string comment '环境,DEV:开发环境,PROD:生产环境',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											string comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间',
  customize_config								string comment '自定义配置',
  table_lifecycle									string comment '逻辑表生命周期',
 	granularity_id									bigint comment '统计粒度ID',
	granularity_name								string comment '统计粒度名称',
	granularity_name_cn							string comment '统计粒度中文名',
	biz_process_id									bigint comment '业务过程ID',
	biz_process_name								string comment '业务过程名称',
	biz_process_name_cn							string comment '业务过程中文名',
	data_domain_id									bigint comment '数据域ID',
	data_domain_name								string comment '数据域名称',
	data_domain_abbreviation				string comment '数据域简称',
	data_domain_name_cn							string comment '数据域中文名',
  biz_detail_time_column					string comment '事实逻辑表时间字段',
  biz_detail_main_table						string comment '事实逻辑表主表',
  biz_detail_main_table_condition	string comment '事实逻辑表主表条件',  
  is_summary_support_cube					string comment '汇总表是否支持cube',
  view_content										string comment '逻辑视图sql内容',
	view_ref_table									string comment '逻辑视图相关表',
  ops_owner_id                    string comment '运维负责人ID',
  ops_owner_name                  string comment '运维负责人名称',
  dev_owner_id                    string comment '开发负责人ID',
  dev_owner_name                  string comment '开发负责人名称',
  physical_data_size              bigint comment '逻辑表所对应所有物理表的存储大小的和,单位Byte'
) comment '逻辑表元数据'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_field

create table if not exists dim_dataphin_field(
	tenant_id 											bigint comment '租户id',
 	field_id												bigint comment '逻辑字段ID',
 	field_name											string comment '逻辑字段名',
 	field_name_cn										string comment '逻辑字段中文名',
 	field_seq												bigint comment '逻辑字段顺序',
  field_desc											string comment '逻辑字段描述',
  field_data_type									string comment '逻辑字段数据类型',
  field_logic											string comment '逻辑字段逻辑',
  field_type											string comment 'SYS:系统字段,DIM:维度属性,REF:事实属性,MEAS:度量字段,SUM:汇总指标',
  field_status										string comment '逻辑字段状态,0:草稿箱,2:已提交,100:开发中,200:发布中,201已发布',
  field_default_value							string comment '逻辑字段默认值',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  model_type											string comment '逻辑表类型,DIM:维度逻辑表,FACT:事实逻辑表,VIEW:逻辑视图,SUM:汇总逻辑表',
  model_id												bigint comment '逻辑表ID',
  model_name											string comment '逻辑表名',
  model_name_cn										string comment '逻辑表中文名',
  is_partition										string comment '是否分区字段 Y/N',
	is_pk														string comment '是否是主键 Y/N',
	is_not_null											string comment '是否不为空 Y/N',
	is_unique												string comment '是否唯一 Y/N',
  is_physical											string comment '是否物理字段,Y/N',
	ref_dimension_id								string comment '关联维度ID',
	ref_dimension_role							string comment '关联维度角色',
	ref_dimension_role_cn						string comment '关联维度角色中文名',
  ref_field_id										bigint comment '关联逻辑字段ID(逻辑视图)', 
	attribute_scope									string comment '字段作用域',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											string comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间',
  classify                        string comment '数据分类,S:公司数据,B:业务数据,C:个人数据,其余为自定义',
  security_level                  string comment '安全等级,L1:对外公开,L2:对内公开,L3:机密数据,L4:绝密数据,其余为自定义'
) comment '逻辑表字段元数据'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

研发与运维

物理运维

dim_dataphin_node

create table if not exists dim_dataphin_node(
	tenant_id 											bigint comment '租户id',
 	node_id													string comment '节点ID',
 	node_name												string comment '节点名称',
  node_desc												string comment '节点描述',
  node_type												string comment '调度类型,NORMAL:周期节点,MANUAL:手动节点',
  operator_type										string comment '节点类型',
  cron_expression									string comment 'cron 表达式',
  cron_type												string comment '调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
  priority												bigint comment '优先级',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  node_status											string comment '节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  param														string comment '节点参数',
  output_name_list								string comment '输出列表',
  compute_engine_config						string comment '计算源配置',
  compute_engine_id								bigint comment '计算源ID',
  compute_engine_name							string comment '计算源名称',
  node_content										string comment '节点内容',	
  is_logical_node									string comment '是否逻辑表调度节点,Y/N',
  resource_group									string comment '资源组',
	node_from                       string comment '节点来源',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
  biz_unit_id         						bigint comment '业务单元ID',
  biz_unit_name       					  string comment '业务单元名称',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											string comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间'
) comment '物理调度节点'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

fct_dataphin_node_taskrun_di

create table if not exists fct_dataphin_node_taskrun_di(
	tenant_id 				    		bigint comment '租户id',
	taskrun_id				    		string comment '实例运行ID',	
	ready_time				    		string comment '满足调度条件的时间',
	dispatch_time			    		string comment '实例分发时间',
	start_execute_time		    string comment '实例运行开始时间',
	finish_execute_time		    string comment '实例运行完成时间',
	taskrun_status			    	string comment '实例运行状态,SUCCESS/FAILED/WAIT_RESOURCE/KILLED/DROPPED/RUNNING/PAUSED/READY',
	with_downstreams		    	string comment '是否关联下游一起调度',
	schedule_type			    		string comment '调度类型,AUTO_SCHEDULED/RERUN/REDISPATCH',
	task_id					    			string comment '实例ID',
	task_name				    			string comment '实例名称',
  task_type                 string comment '实例类型,NORMAL:正常任务,VIRTUAL:虚拟任务,TEMP:临时任务,PAUSED:暂停调度,IDLE:空跑调度',
  task_due_time             string comment '实例计划执行时间,根据cron表达式计算的时间',
  task_upstream_ready_time  string comment '实例上游完成时间',
  task_last_execute_time    string comment '实例最后一次执行时间',
  task_run_times            string comment '实例运行次数',
	dagrun_type				    		string comment '任务运行类型 NORMAL:周期性;MANUAL:手工;SUPPLEMENT:补数据;TEMP:临时',
	operator_type			    		string comment '任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL',
 	node_id					    			string comment '节点ID',	
	node_name				    			string comment '节点名称',	
	biz_date				    			string comment '业务日期',
	env											  string comment '环境,DEV:开发环境,PROD:生产环境',
	index_col				    			string comment '序号',
  is_logical_node			  		string comment '是否逻辑表调度节点,Y/N',
	--node_from				    		string comment '节点来源',
	node_content_version			string comment '任务代码版本号',
  node_content			    		string comment '任务代码',
	project_id				    		bigint comment '项目空间ID',
	project_name			    		string comment '项目空间名称',
	owner_id				    			string comment '所有者ID',
  owner_name				    		string comment '所有者名称',
  gmt_create 				    		string comment '创建时间',
	gmt_modified 			    		string comment '修改时间'
) comment '物理节点调度运行实例'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_datax_node

create table if not exists dim_dataphin_datax_node(
	tenant_id 											bigint comment '租户id',
 	node_id													string comment '节点ID',
 	node_name												string comment '节点名称',
  node_desc												string comment '节点描述',
  node_type												string comment '调度类型,NORMAL:周期节点,MANUAL:手动节点',
  operator_type										string comment '节点类型',
  cron_expression									string comment 'cron 表达式',
  cron_type												string comment '调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY调度周期,MINUTE/HOUR/DAY/MONTH/WEEK',
  priority												bigint comment '优先级',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  node_status											string comment '节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  param														string comment '节点参数',
  output_name_list								string comment '输出列表',
  compute_engine_config						string comment '计算源配置',
  compute_engine_id								bigint comment '计算源ID',
  compute_engine_name							string comment '计算源名称',
  node_content										string comment '节点内容',	
  is_logical_node									string comment '是否逻辑表调度节点,Y/N',
  resource_group									string comment '资源组',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
	reader_type											string comment '读数据类型',
	reader_ds_id										string comment '读数据源ID',
	reader_ds_name									string comment '读数据源名称',
	reader_db_name									string comment '读数据库名称',
	reader_table_name							  string comment '读数据源表名',
	reader_where										string comment '读数据过滤条件',
	writer_type											string comment '写数据类型',
	writer_ds_id										string comment '写数据源ID',
	writer_ds_name									string comment '写数据源名称',
	writer_db_name									string comment '写数据库名称',
	writer_table_name								string comment '写数据源表名',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											string comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间'
) comment 'datax类型-物理调度节点'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_dlink_node

create table if not exists dim_dataphin_dlink_node(
	tenant_id 											bigint comment '租户id',
 	node_id													string comment '节点ID',
 	node_name												string comment '节点名称',
  node_desc												string comment '节点描述',
  node_type												string comment '调度类型,NORMAL:周期节点,MANUAL:手动节点',
  operator_type										string comment '节点类型',
  cron_expression									string comment 'cron 表达式',
  cron_type												string comment '调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
  priority												bigint comment '优先级',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  node_status											string comment '节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  param														string comment '节点参数',
  output_name_list								string comment '输出列表',
  compute_engin_config						string comment '计算源配置',
  compute_engine_id								bigint comment '计算源ID',
  compute_engine_name							string comment '计算源名称',
  node_content										string comment '节点内容',	
  is_logical_node									string comment '是否逻辑表调度节点,Y/N',
  resource_group									string comment '资源组',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
	reader_type											string comment '读数据类型',
	reader_ds_id										string comment '读数据源ID',
	reader_ds_name									string comment '读数据源名称',
	reader_db_name									string comment '读数据库名称',
	reader_table_name								string comment '读数据源表名',
	writer_type											string comment '写数据类型',
	writer_ds_id										string comment '写数据源ID',
	writer_ds_name									string comment '写数据源名称',
	writer_db_name									string comment '写数据库名称',
	writer_table_name								string comment '写数据源表名',
  owner_id												bigint comment '所有者ID',
  owner_name											string comment '所有者名称',
  modifier_id											bigint comment '最近一次修改者ID',
  modifier_name										string comment '最近一次修改者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间'
) comment 'dlink类型-物理调度节点,注意该表node_id可能不唯一'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_node_edge

说明

1. 表中 source_node_id+source_node_output_name+target_node_id 唯一。

2. source_node_name字段中,以virtual_root_node开头的节点为系统内置根节点。

3. 逻辑表同时展示逻辑节点(一张逻辑表对应一个逻辑节点)的依赖关系及其内部物化节点(一个逻辑节点可能对应一个或多个物化节点)的依赖关系。如果您只需要关注逻辑节点的依赖关系,可以筛选target_operator_type = 'LOGICAL' and source_operator_type = 'LOGICAL'。

create table if not exists dim_dataphin_node_edge
(
    tenant_id                   bigint comment '租户ID',
    source_node_id              string comment '上游节点id',
  	source_node_name						string comment '上游节点名称',
  	source_node_status					string comment '上游节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  	source_node_type						string comment '上游节点调度类型,NORMAL:周期节点,MANUAL:手动节点',
  	source_cron_type						string comment '上游节点调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
  	source_operator_type			  string comment '上游节点任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL/ONE_SERVICE_SQL_HIVE_CDP/VVP_BATCH等',
		source_is_logical_node			string comment '上游节点是否逻辑表调度节点,Y/N',
		source_project_id						bigint comment '上游节点项目空间ID',
		source_project_name					string comment '上游节点项目空间名称',
    source_node_output_name     string comment '上游节点输出名称',
    target_node_id              string comment '下游节点id',
  	target_node_name						string comment '下游节点名称',
  	target_node_status					string comment '下游节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
		target_node_type						string comment '下游节点调度类型,NORMAL:周期节点',
  	target_cron_type						string comment '下游节点调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
    target_operator_type			  string comment '下游节点任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL/ONE_SERVICE_SQL_HIVE_CDP/VVP_BATCH等',
		target_is_logical_node			string comment '下游节点是否逻辑表调度节点,Y/N',
		target_project_id						bigint comment '下游节点项目空间ID',
		target_project_name					string comment '下游节点项目空间名称',  
    period_diff                 bigint comment '周期差, 始终为非负数。1. 如果source和target相同, periodDiff不能为0,periodDiff表示自依赖的周期差, 自依赖周期差默认为1。2. 如果source和target不相同, periodDiff默认为0,当periodDiff为正数时,表示节点target依赖source的前periodDiff天的结果',
    day_diff                    bigint comment '天数差,表示target依赖前dayDiff天的所有source.默认是null,如果不是null,则periodDiff没有用',
    is_self_depend							string comment '是否自依赖,Y/N',
    env                         string comment '环境,PROD/DEV',
  	gmt_create                  string comment '创建时间',
    gmt_modified                string comment '最近修改时间'
) comment '物理调度节点依赖关系表'
partitioned by (ds string comment '分区字段')
stored as orc;

fct_dataphin_node_task_link_di

说明

仅保留生产环境系统自动生成的周期实例数据,按照vdm_link中周期任务T-2的11点后的做增量。

create table if not exists fct_dataphin_node_task_link_di
(
    tenant_id                   bigint comment '租户ID',
    source_task_id      				string comment '上游task_id',
		source_task_name				   	string comment '实例名称',
  	source_task_type            string comment '实例类型,NORMAL:正常任务,VIRTUAL:虚拟任务,TEMP:临时任务,PAUSED:暂停调度,IDLE:空跑调度',
		source_operator_type			  string comment '任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL/ONE_SERVICE_SQL_HIVE_CDP/VVP_BATCH等',
 		source_task_status  				string comment '下游task状态,INIT:未运行,WAIT_SCHEDULE:等待调度,DISPATCH_TO_AGENT_BLOCKED:分发被阻塞,WAIT_SUBMISSION:等待提交,WAIT_RESOURCE:等待资源,FAILED:运行失败,RUNNING:运行中,KILLED:运行中止,PAUSED:暂停,SUCCESS:运行成功',
		source_biz_date				    	string comment '业务日期',
  	source_node_id              string comment '上游节点id',
  	source_node_name						string comment '上游节点名称',
  	source_node_status					string comment '上游节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  	source_node_type						string comment '上游节点调度类型,NORMAL:周期节点',
  	source_cron_type						string comment '上游节点调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
		source_project_id						bigint comment '上游实例项目空间ID',
		source_project_name					string comment '上游实例项目空间名称',
    target_task_id      				string comment '下游task_id',
    target_task_name				   	string comment '实例名称',
  	target_task_type            string comment '实例类型,NORMAL:正常任务,VIRTUAL:虚拟任务,TEMP:临时任务,PAUSED:暂停调度,IDLE:空跑调度',
		target_operator_type			  string comment '任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL/ONE_SERVICE_SQL_HIVE_CDP/VVP_BATCH等',
 		target_task_status  				string comment '下游task状态,INIT:未运行,WAIT_SCHEDULE:等待调度,DISPATCH_TO_AGENT_BLOCKED:分发被阻塞,WAIT_SUBMISSION:等待提交,WAIT_RESOURCE:等待资源,FAILED:运行失败,RUNNING:运行中,KILLED:运行中止,PAUSED:暂停,SUCCESS:运行成功',
		target_biz_date				    	string comment '业务日期',
  	target_node_id              string comment '上游节点id',
  	target_node_name						string comment '上游节点名称',
  	target_node_status					string comment '上游节点状态,NORMAL:正常调度,PAUSED:暂停调度,IDLE:空跑调度',
  	target_node_type						string comment '上游节点调度类型,NORMAL:周期节点',
  	target_cron_type						string comment '上游节点调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
		target_project_id						bigint comment '上游实例项目空间ID',
		target_project_name					string comment '上游实例项目空间名称',
    dagrun_type				    		  string comment '任务运行类型 NORMAL:周期性;MANUAL:手工;SUPPLEMENT:补数据;TEMP:临时',
   	is_self_depend							string comment '是否自依赖',
    env                         string comment '环境,PROD/DEV',
  	gmt_create                  string comment '创建时间',
    gmt_modified                string comment '最近修改时间'
) comment '物理调度实例依赖关系表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_monitored_rule

create table if not exists dim_dataphin_monitored_rule(
    tenant_id                bigint comment '租户ID',
    monitored_rule_id        bigint comment '监控配置项ID',
    monitored_rule_type      string comment '监控配置类型,LOGIC_FIELD:逻辑表字段,SCHEDULE_PHYSICAL_NODE:周期物理任务,MANUAL_PHYSICAL_NODE:手动物理任务,LOGICAL_TABLE_NODE:逻辑表任务,PROJECT:项目级',
    switch_status            string comment '开关状态:TRUE/FALSE',
    external_node_id         string comment '监控对象ID,具体取决于monitored_rule_type字段',
    external_node_name       string comment '监控对象名称',
    project_id               bigint comment '项目ID',
    project_name             string comment '项目名称',
    model_id                 string comment '逻辑表ID,监控配置类型为LOGIC_FIELD时存在',
    model_name               string comment '逻辑表名称,监控配置类型为LOGIC_FIELD时存在',
    biz_unit_id              string comment '逻辑表所在业务板块ID,监控配置类型为LOGIC_FIELD时存在',
    biz_unit_name            string comment '逻辑表所在业务板块名称,监控配置类型为LOGIC_FIELD时存在',
    alert_reason_type        string comment '告警原因:DATA_DELAY:数据延迟,FAILED:运行失败,SUCCESS:运行成功,TIME_OUT:超时,UNFINISHED:未完成',
    alert_reason_config      string comment '告警原因配置',
    alert_strategy           string comment '告警发送策略',
    owner_id                 string comment '负责人ID',
    owner_name               string comment '负责人名称',
    last_modifier_id         string comment '最近修改人ID',
    last_modifier_name       string comment '最近修改人名称',
    gmt_create               string comment '创建时间',
    gmt_modified             string comment '修改时间'
) comment '运维监控配置表'
partitioned by (ds string comment '分区字段,yyyymmddd')
stored as orc;

fct_dataphin_dlink_node_taskrun_step_metric_di

create table if not exists fct_dataphin_dlink_node_taskrun_step_metric_di(
     tenant_id               bigint comment '租户ID',
     project_id              bigint comment '项目ID',
     project_name            string comment '项目名称',
     taskrun_id              string comment '实例运行ID',
     engine_type             string comment '引擎类型:dlink',
     env                     string comment '环境模式:DEV/PROD',
     gmt_create              string comment '创建时间',
     dagrun_type             string comment '任务运行类型 NORMAL:周期性;MANUAL:手工;SUPPLEMENT:补数据;TEMP:临时',
     taskrun_status          string comment '实例运行状态:INIT/WAIT_SCHEDULE/DISPATCH_TO_AGENT_BLOCKED/WAIT_SUBMISSION/WAIT_RESOURCE/RUNNING/FAILED/KILLING/KILLED/PAUSED/SUCCESS/TASK_NOT_EXISTS',
     exception_info          string comment '实例运行失败异常信息',
     total_time              bigint comment '实例运行总时间(秒)',
     start_time              string comment '实例运行开始时间',
     end_time                string comment '实例运行结束时间',
     node_id                 string comment '节点ID',
     schedule_interval_type  string comment '节点调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY/YEARLY',
     node_config_memory      bigint comment '节点配置内存(MB)',
     node_config_cpu         double comment '节点配置cpu',
     node_config_paralle     bigint comment '节点配置全局并发',
     owner_id                string comment '节点负责人ID',
     owner_name              string comment '节点负责人名称',
     task_id                 string comment '实例ID',
     task_name               string comment '任务名称',
     biz_date                string comment '业务日期',
     execute_ip              string comment '实例运行机器地址',
     total_lines_reader      bigint comment '实例运行总成功读取记录数',
     total_lines_written     bigint comment '实例运行总成功总写入记录数',
     total_lines_rejected    bigint comment '实例运行脏数据记录数',
     total_bytes_reader      bigint comment '实例运行总成功读取数据字节数',
     total_bytes_written     bigint comment '实例运行总成功写入数据字节数',
     total_wait_reader_time  bigint comment '实例运行读等待时间(毫秒)',
     total_wait_writer_time  bigint comment '实例运行写等待时间(毫秒)',
     avg_reader_record       bigint comment '实例运行平局读取记录数每秒',
     avg_writer_record       bigint comment '实例运行平均写入记录数每秒',
     avg_reader_bytes        double comment '实例运行务平局读取字节数每秒',
     avg_writer_bytes        double comment '实例运行平均写入字节数每秒',
     taskrun_content         string comment '实例运行json代码',
     memory_info             string comment '实例运行内存使用信息',
     average_cpu             double comment '实例运行cpu平均负载(百分比)',
     gc_time                 bigint comment '实例运行gc总耗时(毫秒)',
     step_name               string comment '步骤名称',
     category                string comment '读写类型:reader/writer/transform/filter/map',
     step_type               string comment 'dlink步骤类型',
     step_ds_type            string comment 'COMPUTE:计算源,DATASOURCE:数据源,LOGICTABLE:逻辑表,OTHER:其他',
     ds_id                   bigint comment '数据源ID或计算源ID',
     ds_name                 string comment '数据源名称或计算源名称',
     ds_project_id           bigint comment '计算源绑定项目ID,使用项目做计算源时存在',
     ds_project_name         string comment '计算源绑定项目名称,使用项目做计算源时存在',
     ds_biz_unit_id          string comment '逻辑表业务板块ID,步骤读逻辑表是存在',
     ds_biz_unit_name        string comment '逻辑表业务板块,步骤读逻辑表是存在',
     ds_type                 string comment '数据源或计算源类型',
     table_name              string comment '步骤读写表(多表只展示一个)',
     tables_list             string comment '步骤读写表(全量表,多表逗号分隔符)',
     step_lines_reader       bigint comment '步骤读取记录数',
     step_lines_written      bigint comment '步骤写入记录数',
     step_lines_rejected     bigint comment '步骤脏数据记录数',
     step_bytes_reader       bigint comment '步骤读取字节数',
     step_bytes_written      bigint comment '步骤写入字节数',
     step_wait_reader_time   bigint comment '步骤读等待时间',
     step_wait_writer_time   bigint comment '步骤写等待时间'
) comment '集成任务节点运行实例统计信息:粒度为taskrun_id+step_name'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc
;

fct_dataphin_monitor_alert_event_di

create table if not exists fct_dataphin_monitor_alert_event_di
(
     tenant_id                      bigint comment '租户Id',
     alert_event_id                 bigint comment '告警事件id',
     source_system                  string comment '来源系统,DQE:数据质量,KGB:基线,VDM_BATCH:调度运维,OS:数据服务,STREAM:实时计算,REAL_TIME_PIPELINE:实时集成',
     alert_object_name              string comment '对象名称',
     alert_object_type              string comment '对象类型:REAL_TIME_PIPELINE_TASK:实时计算任务,OS_API:API接口,OS_APPLICATION_SERVICE:数据服务应用,KGB:基线,VDM_开头:离线任务,DQE_开头:数据质量',
     project_id                     bigint comment '项目ID',
     project_name                   string comment '项目名称',
     biz_unit_id                    bigint comment '业务板块ID',
     biz_unit_name                  string comment '业务板块名称',
     biz_date                       string comment '业务日期',
     alert_reason                   string comment '告警原因,枚举值见说明',
     alert_reason_params            string comment '告警原因参数',
     latest_alert_time              string comment '最新告警时间',
     first_alert_time               string comment '首次告警时间',
     url_config                     string comment '链接信息',
     alert_sending_config           string comment '告警频率信息',
     status                         string comment '告警状态,ALERTING:告警中,DO_NOT_DISTURB:免打扰,SILENCING:告警中(静默期),FINISH:告警完成',
     do_not_disturb_end_time        string comment '免打扰结束时间',
     total_alert_times              bigint comment '告警次数',
     alert_channel_list             string comment '告警渠道列表,VOICE:电话,SMS:短信,MAIL:邮件,DINGTALK_ROBOT:钉钉,DINGDING:钉钉工作通知,CUSTOM:自定义渠道,SILENCE:不发送',
     alert_user_list                string comment '告警接收人列表',
     alert_advanced_config          string comment '高级配置',
     owner_id                       string comment '负责人ID',
     owner_name                     string comment '负责人名称',
     on_call_table_list             string comment '值班表列表',
     gmt_create                     string comment '告警事件创建时间',
     gmt_modified                   string comment '告警事件修改时间',
     source_system_id               string comment '根据source_system不同,值不同. KGB:dim_dataphin_baseline_object.baseline_id,VDM_BATCH:dim_dataphin_monitored_rule.monitored_rule_id',
     source_system_biz_id           string comment '根据source_system不同,值不同. DQE:dim_dataphin_dp_quality_rule.rule_id,VDM_BATCH:dim_dataphin_node.node_id或dim_dataphin_model.model_id'
)comment '告警事件表:按照首次告警时间first_alert_time做日增量'
partitioned by (ds string comment '分区字段,yyyymmdd')
stored as orc;
说明

alert_reason枚举值:

  • 数据质量:

    • DQE_COLUMN:字段规则异常。

    • DQE_DATA_SOURCE:数据源规则异常。

    • DQE_TABLE:表规则异常。

    • DQE_REALTIME_TABLE:实时表规则异常。

    • DQE_INDEX:指标规则异常。

  • 数据服务:

    • OS_AVG_RESPONSE:平均响应时间异常。

    • OS_CALL_TIMES:调用次数异常。

    • OS_ERROR_RATE:错误率异常。

    • OS_OFFLINE:Offline百分比异常。

  • 离线周期任务:

    • VDM_BATCH_ERROR:出错。

    • VDM_BATCH_FINISH:完成。

    • VDM_BATCH_TIME_OUT:运行超时。

    • VDM_BATCH_UNDONE:未完成。

    • VDM_BATCH_LOGIC_DATA_DELAY:逻辑表数据延迟。

  • 基线:

    • KGB_TASK_ERROR:基线任务出错。

    • KGB_TASK_SLOW_DOWN:基线任务变慢。

    • KGB_EARLY_WARNING:基线预警。

    • KGB_BROKEN_LINE:基线破线。

  • 实时计算和实时集成:

    • STREAM_BIZ_DELAY:业务延迟过高。

    • STREAM_DATA_RETENTION:数据滞留超过配置。

    • STREAM_MORE_THAN_FAILURE:失败频率超过配置。

    • STREAM_TPS_OUT_RANGE:TPS超过范围。

    • STREAM_CHECKPOINT_FAILURE:checkpoint失败超过配置。

    • STREAM_BACKPRESSURE:反压持续时间超过配置。

    • STREAM_JOB_FAILURE:运行失败。

  • 其他自定义:

    • LOGICAL_INSTANCE_GENERATION:逻辑实例生成监控。

fct_dataphin_monitor_alert_notification_di

说明

alert_reason枚举值:同上fct_dataphin_monitor_alert_event_di表的alert_reason枚举值。

create table if not exists fct_dataphin_monitor_alert_notification_di(
     tenant_id             bigint comment '租户Id',
     alert_notification_id bigint comment '推送记录id',
     alert_event_id        bigint comment '告警事件id,fct_dataphin_monitor_alert_event_di.alert_event_id,-1为合并多个告警事件场景',
     source_system         string comment '来源系统,DQE:数据质量,KGB:基线,VDM_BATCH:调度运维,OS:数据服务,STREAM:实时计算,REAL_TIME_PIPELINE:实时集成',
     alert_object_name     string comment '对象名称',
     alert_object_type     string comment '对象类型:REAL_TIME_PIPELINE_TASK:实时计算任务,OS_API:API接口,OS_APPLICATION_SERVICE:数据服务应用,KGB:基线,VDM_开头:离线任务,DQE_开头:数据质量',
     notify_time           string comment '推送时间',
     biz_date              string comment '业务日期',
     alert_reason          string comment '告警原因,枚举值见说明',
     alert_reason_params   string comment '告警原因参数',
     message_content       string comment '告警内容',
     receiver_type         string comment '接受人类型,ON_CALL_TABLE:值班表,USER_DEFINED:自定义用户,OWNER:负责人',
     alert_channel         string comment '推送渠道',
     alert_user            string comment '推送接收人',
     on_call_table_id      bigint comment '值班表id',
     on_call_table_name    string comment '值班表名称',
     notify_status         string comment '推送状态,SUCCESS:发送成功,FAILED:发送失败,SENDING:正在发送,UNKNOWN:未知状态',
     fail_reason           string comment '失败原因',
     gmt_create            string comment '创建时间',
     gmt_modified          string comment '修改时间'
)comment '告警推送记录表:按照推送时间notify_time做日增量'
partitioned by (ds string comment '分区字段,yyyymmdd')
stored as orc;

逻辑运维

dim_dataphin_model_node

create table if not exists dim_dataphin_model_node(
	tenant_id 											bigint comment '租户id',
 	model_node_id										string comment '逻辑表节点ID',
 	model_node_name									string comment '逻辑表节点名',
 	model_node_name_cn							string comment '逻辑表节点中文名',
  model_id												bigint comment '逻辑表ID',		
  model_name											string comment '逻辑表名称',
  model_name_cn										string comment '逻辑表中文名称',
  model_type											string comment '逻辑表类型',
 	control_node_id									string comment '控制节点ID,对应dim_dataphin_vdm_node表node_id',
  cron_type												string comment '调度周期,MINUTELY/HOURLY/DAILY/MONTHLY/WEEKLY',
	fix_time												string comment '预调起时间',
  is_paused												string comment '是否暂停,Y/N',
  field_cnt												bigint comment '字段数',
  field_group_cnt									bigint comment '字段分组数',
  priority												string comment '优先级',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  is_level					              string comment '是否层级维度',
  level_mid_node_id			          string comment '层级维度mid节点id',
  level_mid_node_name			        string comment '层级维度mid节点名称',
  resource_group									string comment '资源组',
  task_group											string comment '任务组',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间'
) comment '逻辑表调度节点'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

fct_dataphin_model_node_task_di

create table if not exists fct_dataphin_model_node_task_di(
	tenant_id 											bigint comment '租户id',
 	model_task_id										string comment '逻辑表节点ID',
 	model_node_id										string comment '逻辑表节点ID',
  model_node_name									string comment '逻辑表节点名',
 	model_node_name_cn							string comment '逻辑表节点中文名',
  model_task_type									string comment '任务运行类型 NORMAL:周期性;MANUAL:手工;SUPPLEMENT:补数据;TEMP:临时',
  start_time											string comment '开始运行时间',
  end_time												string comment '结束运行时间',
  model_id												bigint comment '逻辑表ID',		
  model_name											string comment '逻辑表名称',
  model_name_cn										string comment '逻辑表中文名称',
  model_type											string comment '逻辑表类型',
 	control_node_id									string comment '控制节点ID,对应dim_dataphin_vdm_node表node_id',
 	control_node_task_id						string comment '控制节点实例ID,dwd_dataphin_vdm_node_taskrun_di表的task_id',
  cron_type												string comment '调度周期,MINUTE/HOUR/DAY/MONTH/WEEK',
  fix_time												string comment '预调起时间',
  biz_date                        string comment '业务日期',
	is_paused												string comment '是否暂停,Y/N',
  paused_type											string comment '暂停类型',
  initialized											string comment '是否初始化,Y/N',
  field_cnt												bigint comment '字段数',
  field_group_cnt									bigint comment '字段分组数',
  priority												string comment '优先级',
  internal_status									string comment '字段混合状态',
  env															string comment '环境,DEV:开发环境,PROD:生产环境',
  is_level					              string comment '是否层级维度',
  level_mid_node_id			          string comment '层级维度mid节点id',
  level_mid_node_name			        string comment '层级维度mid节点名称',
  resource_group									string comment '资源组',
  task_group											string comment '任务组',
	project_id											bigint comment '项目空间ID',
	project_name										string comment '项目空间名称',
	biz_unit_id											bigint comment '业务板块ID',
	biz_unit_name										string comment '业务板块名称',
  owner_id												string comment '所有者ID',
  owner_name											string comment '所有者名称',
  gmt_create 											string comment '创建时间',
	gmt_modified 										string comment '修改时间'
) comment '逻辑表调度实例'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

OS

fct_dataphin_os_task_table_inputoutput_di

说明

粒度:执行任务ID + 输入表ID + 输入环境 + 输出表ID + 输出环境。

create table if not exists fct_dataphin_os_task_table_inputoutput_di (
  tenant_id             bigint comment '租户ID',
  os_task_id            string comment '执行任务ID',
  os_instance_id        string comment '执行实例ID',
  os_job_id             string comment '执行调度ID',
  engine_job_id         string comment '执行引擎jobId,MaxCompute为instanceId',
  vdm_task_id           string comment 'vdm taskId',
  vdm_taskrun_id        string comment 'vdm taskrunID',
  os_task_source        string comment '执行任务来源',
  biz_id                string comment '业务id',
  dagrun_type		    		string comment '任务运行类型 NORMAL:周期性;MANUAL:手工;SUPPLEMENT:补数据;TEMP:临时',
  operator_type					string comment '任务类型 ONE_SERVICE_SQL/MAX_COMPUTE_SQL/DATAX/DLINK/FLINK_STREAMING/MAX_COMPUTE_MR/PYTHON/SHELL/VIRTUAL',
  node_id			    			string comment '节点ID',	
  sql_type              string comment '任务类型:dml',
  gmt_create            string comment '创建时间',
  run_time              string comment '开始运行时间',
  env                   string comment '环境,DEV/PROD',
  input_project_id            bigint comment '输入项目ID',
  input_project_name          string comment '输入项目名称',
  input_biz_unit_id           bigint comment '输入业务板块ID',
  input_biz_unit_name         string comment '输入业务板块名称',
  --input_table_id              string comment '废弃,置空',
  input_table_name            string comment '输入表名',
  input_env                   string comment '输入环境,DEV/PROD',
  input_is_logical_table      string comment '输入报是否逻辑表,Y/N',
  output_project_id            bigint comment '输出项目ID',
  output_project_name          string comment '输出项目名称',
  output_biz_unit_id           bigint comment '输出业务板块ID',
  output_biz_unit_name         string comment '输出业务板块名称',
  --output_table_id              string comment '废弃,置空',
  output_table_name            string comment '输出表名',
  output_env                   string comment '输出环境,DEV/PROD',
  output_is_logical_table      string comment '输出表是否逻辑表,Y/N'
)comment 'OS SQL解析的输入输出表'
partitioned by (ds string comment '分区字段yyyymmdd')
stored as orc;

基线

dim_dataphin_baseline_object

create table if not exists dim_dataphin_baseline_object(
    tenant_id                    bigint comment '租户ID',
    baseline_id                  bigint comment '基线ID',
    baseline_name                string comment '基线名称',
    baseline_type                string comment '基线类型,DAY:天基线,HOUR:小时基线,EMPTY:空基线',
    baseline_description         string comment '基线描述',
    promise_times                string comment '承诺产出时间,json格式',
    warning_times                string comment '预警时间,json格式',
    baseline_priority            bigint comment '基线优先级,1:最低,2:低,3:中,4:高,5:超高',
    warning_setting              string comment '基线告警配置,json格式',
    baseline_warning_switch      string comment '基线告警开关:TRUE/FALSE',
    baseline_owner_id            string comment '基线负责人ID',
    baseline_owner_name          string comment '基线负责人名称',
    baseline_modifier_id         string comment '最近修改人ID',
    baseline_modifier_name       string comment '最近修改人名称',
    object_type                  string comment '对象类型,PHYSICAL_NODE:物理任务,LOGIC_FIELD:逻辑表任务',
    object_id                    string comment '对象ID,与object_type有关',
    object_name                  string comment '对象名称',
    object_catalog               string comment '对象所属catalog, 项目名称或业务板块名称',
    object_owner_id              string comment '对象负责人ID',
    object_owner_name            string comment '对象负责人名称',
    object_project_id            string comment '物理任务所在项目ID',
    object_project_name          string comment '物理任务所在项目名称',
    object_biz_unit_id           string comment '逻辑表任务所在业务板块ID',
    object_biz_unit_name         string comment '逻辑表任务所在业务板块名称',
    object_field_names           string comment '逻辑表字段名列表,逗号分隔',
    object_fix_produce_time      string comment '对象固定产出时间',
    gmt_create                   string comment '创建时间',
    gmt_modified                 string comment '修改时间'
) comment '基线监控对象表'
partitioned by (ds string comment '分区字段,yyyymmddd')
stored as orc;

公共

用户

dim_dataphin_tenant_user

create table if not exists dim_dataphin_tenant_user(  
  tenant_id						bigint comment '租户ID',
  user_id             string comment 'Dataphin用户ID',
	account_name        string comment '账号名称',
	account_type        string comment '账号类型',
	display_name        string comment '显示名称',
	nickname            string comment '昵称',
	real_name           string comment '真实名称',
	source_user_id      string comment '用户来源系统ID',
	source_type         string comment '用户来源系统类型',
	gmt_create          string comment '创建时间',
	gmt_modified        string comment '修改时间',
	mail                string comment '电子邮箱',
  creator_id					string comment '创建者Dataphin用户ID',
  creator_name				string comment '创建者Dataphin账号名称',
  modifier_id					string comment '修改者Dataphin用户ID',
  modifier_name				string comment '修改者Dataphin账号名称',
  user_status         string comment '用户状态,NORMAL:正常(默认值),DELETE:删除,DEACTIVATE:失效',
  system_role_list    string comment '系统角色列表,逗号分隔,DATASOURCE_MANAGER:数据源管理员,DATA_STANDARD_MANAGER:数据标准管理员,EXPORT_ADMIN:导入导出管理员,LABELS_BUSINESS_PLANNER:标签规划师,QUALITY_MANAGER:质量管理员,SECURITY_ADMIN:安全管理员,SUPER_ADMIN:超级管理员,SYSTEM_ADMIN:系统管理员'
) comment '租户用户表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_project_user

create table if not exists dim_dataphin_project_user(  
    tenant_id		    		bigint comment '租户ID',
    user_id             string comment 'Dataphin用户ID',
		account_name        string comment '账号名称,生产账号为项目名',
		display_name        string comment '显示名称',
		nickname            string comment '昵称',
		real_name           string comment '真实名称',
		project_id          bigint comment '项目ID',
    project_name        string comment '项目名称',
    env                 string comment '环境, DEV/PROD',
    role_name           string comment '项目角色,PROJECT_OWNER/PROJECT_ADMIN/PROJECT_DEVELOPER/PROJECT_GUEST/PROJECT_ANALYST/PROJECT_PRODUCT/PROJECT_VIEWER/PROJECT_PRODUCT/PROJECT_OPS/PROJECT_BUSINESS_MEMBER',
    role_display_name   string comment '项目角色显示名称',
		gmt_create          string comment '创建时间',
		gmt_modified        string comment '修改时间'
) comment '项目用户表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

项目

dim_dataphin_project

create table if not exists dim_dataphin_project(
	tenant_id 					bigint comment '租户id',
	project_id 					bigint comment '项目ID',
	project_name 				string comment '项目英文名称',
	project_name_cn 		string comment '项目中文名称',
  project_desc				string comment '项目描述',
  biz_unit_id					bigint comment '业务单元ID',
  biz_unit_name				string comment '业务单元名称',
  owner_id						string comment '项目所有者ID',
  owner_name					string comment '项目所有者名称',
  project_mode				string comment '项目模式,BASIC:基础模式,DEV_PROD:开发/生产模式',
	env									string comment '项目环境,DEV:开发环境,PROD:生产环境',
  ns_tag							string comment '空间类型,PUBLIC:中间层,APPLICATION:应用层,BASE:贴源层,GENERAL:通用层',
  gmt_create 					string comment '创建时间',
	gmt_modified 				string comment '修改时间'
	
) comment '项目空间表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_project_compute_engine

create table if not exists dim_dataphin_project_compute_engine(
	tenant_id 										bigint comment '租户id',
	project_id 										bigint comment '项目ID',
	project_name 									string comment '英文名称',
	compute_engine_id						 	bigint comment '计算源ID',
  compute_engine_name						string comment '计算源名称',
  env														string comment '项目环境,DEV:开发环境,PROD:生产环境',
  compute_engine_support_type		string comment '计算源支持类型,OFFLINE:离线引擎,REALTIME:实时引擎,ANALYTICAL:加速引擎',
  compute_engine_desc						string comment '计算源描述',
  db_type												string comment '计算源类型,MAX_COMPUTE/HADOOP/FLINK/ANALYTICDB_FOR_PG/HOLOGRES/VVP',
  db_name												string comment '计算源的物理空间名称,MAX_COMPUTE/hive为项目名,ADB PG为库名称等',
  shema_name                    string comment 'shema名称',
  maxcompute_project_name       string comment 'MAX_COMPUTE的项目名称',
  end_point                     string comment '访问地址',
  config_plaintext						  string comment '计算源配置明细,json格式',
  owner_id											string comment '计算源所有者ID',
  owner_name										string comment '计算源所有者名称',
 	deploy_type										string comment '部署的方式:数据源的部署方式,公网部署,RDS部署,ECS自建等',
  access_type										string comment '数据源的访问:公网访问,VPC访问等',
  gmt_create 										string comment '计算源绑定时间',
	gmt_modified 									string comment '计算源修改时间'
) comment '项目空间与计算引擎绑定关系表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

数据源

dim_dataphin_data_source

create table if not exists dim_dataphin_data_source(
	tenant_id 							bigint comment '租户id',
	data_source_id 					bigint comment '数据源ID',
	data_source_name 				string comment '数据源名称',
  data_source_desc				string comment '数据源描述',
  data_source_type				string comment '数据源类型,MAX_COMPUTE/MYSQL/SQL_SERVER/HIVE/ONE_SERVICE/POSTGRE_SQL/FTP/EMR_HIVE/ORACLE/HDFS/DRDS/ANALYTICDB/MONGODB/FLINK/ANALYTICDB_FOR_PG/HOLOGRES/HBASE_1_1_X等',
  scope										string comment '范围,OFFLINE:离线数据源,STREAMING:实时数据源,ALL:离线+实时数据源,DATA_DISTILL:数据萃取数据源,DIP_META_SYNC:元数据仓库数据源',
  jdbc_url								string comment 'MAX_COMPUTE为endPoint,HIVE/MYSQL/ORACLE/POSTGRE_SQL等为jdbc url',
  db_name									string comment '计算源的物理空间名称,MAX_COMPUTE/HIVE为项目名,MYSQL/ORACLE等为库名称',
  shema_name              string comment 'shema名称',
	customized_type					string comment '用户自定义类型',
  env											string comment '项目环境,DEV:开发环境,PROD:生产环境',
	owner_id								string comment '项目所有者ID',
  owner_name							string comment '项目所有者名称',
  gmt_create 							string comment '创建时间',
	gmt_modified 						string comment '修改时间',
  data_source_catalog     string comment '数据源编码,以ds_为前缀'
) comment '数据源表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_data_source_config

create table if not exists dim_dataphin_data_source_config(
	tenant_id 						bigint comment '租户id',
	data_source_id 				bigint comment '数据源ID',
	data_source_name 			string comment '数据源名称',
  data_source_desc			string comment '数据源描述',
  data_source_type			string comment '数据源类型,MAX_COMPUTE/MYSQL/SQL_SERVER/HIVE/ONE_SERVICE/POSTGRE_SQL/FTP/EMR_HIVE/ORACLE/HDFS/DRDS/ANALYTICDB/MONGODB/FLINK/ANALYTICDB_FOR_PG/HOLOGRES/HBASE_1_1_X等',
  env										string comment '项目环境,DEV:开发环境,PROD:生产环境',
  key_name							string comment '范围,OFFLINE:离线数据源,STREAMING:实时数据源,ALL:离线+实时数据源,DATA_DISTILL:数据萃取数据源,DIP_META_SYNC:元数据仓库数据源??',
  value						    	string comment 'MAX_COMPUTE为endPoint,HIVE/MYSQL/ORACLE/POSTGRE_SQL等为jdbc url',
  gmt_create 						string comment '创建时间',
	gmt_modified 					string comment '修改时间'
) comment '数据源配置表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

数据资产

物理表

dim_dataphin_table

说明

特殊的,如果某张物理表为注册上挂指标的来源表,则is_from_logical字段取值为Y。

create table if not exists dim_dataphin_table(
	tenant_id 										bigint comment '租户id',
 	project_id 										bigint comment 'Dataphin项目ID',
	project_name 									string comment 'Dataphin项目名称', 
  table_name										string comment '表名称',
	table_comment								  string comment '表注释',
  table_type										string comment 'TABLE/VIEW',
	is_from_logical								string comment '是否是规范产生的物理表,Y/N',
	is_partitioned								string comment '是否为分区表,Y/N',
	last_ddl_time									string comment '表DDL最后变更时间',
	last_dml_time									string comment '表最后数据变更时间',
  view_text											string comment '视图内容',
  physical_data_size						bigint comment '表实际占用物理存储大小',
  data_size											bigint comment '表逻辑存储大小',
  create_time										string comment '表创建时间',
  modify_time										string comment '修改时间',
  record_num										bigint comment '记录数',
  life_cycle										bigint comment '生命周期,目前仅MaxCompute有',
	compute_engine_id						 	bigint comment '计算源ID',
  compute_engine_name						string comment '计算源名称',
  env														string comment '项目环境,DEV:开发环境,PROD:生产环境',
  compute_engine_support_type		string comment '计算源使用类型,OFFLINE:离线引擎,REALTIME:实时引擎,ANALYTICAL:加速引擎',
  compute_engine_desc						string comment '计算源描述',
  db_type												string comment '计算源类型,max_compute/hadoop/flink/analyticdb_for_pg/HOLOGRES/vvp',
  db_name												string comment '计算源的物理空间名称,maxCompute/hive为project_name,ADB PG为库名称等',
  --table_id											string comment '废弃,置空',
  owner_id											string comment '表所有者ID',
  owner_name										string comment '表所有者名称',
  is_external_table             string comment '是否外表,Y/N',
  schema_name                   string comment '计算源的schema名称,hologres/adbpg等存在'
) comment '物理表元数据'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_table_partition

说明

特殊的,如果某张物理表为注册上挂指标的来源表,则is_from_logical字段取值为Y。

create table if not exists dim_dataphin_table_partition(
	tenant_id 										bigint comment '租户id',
 	project_id 										bigint comment 'Dataphin项目ID',
	project_name 									string comment 'Dataphin项目名称', 
  table_name										string comment '表名称',
  partition_name								string comment '分区名称',
	is_from_logical								string comment '是否是规范产生的物理表,Y/N',
	last_ddl_time									string comment '表DDL最后变更时间',
	last_dml_time									string comment '表最后数据变更时间',
  physical_data_size						bigint comment '表实际占用物理存储大小',
  data_size											bigint comment '表逻辑存储大小',
  create_time										string comment '创建时间',
  modify_time										string comment '修改时间',
  record_num										bigint comment '记录数',
	compute_engine_id						 	bigint comment '计算源ID',
  compute_engine_name						string comment '计算源名称',
  env														string comment '项目环境,DEV:开发环境,PROD:生产环境',
  compute_engine_support_type		string comment '计算源使用类型,OFFLINE:离线引擎,REALTIME:实时引擎,ANALYTICAL:加速引擎',
  compute_engine_desc						string comment '计算源描述',
  db_type												string comment '计算源类型,max_compute/hadoop/flink/analyticdb_for_pg/HOLOGRES/vvp',
  db_name												string comment '计算源的物理空间名称,maxCompute/hive为project_name,ADB PG为库名称等',
  --table_id											string comment '废弃,置空',
  owner_id											string comment '表所有者ID',
  owner_name										string comment '表所有者名称',
  schema_name                   string comment '计算源的schema名称,hologres/adbpg等存在'
) comment '物理表分区元数据'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_column

说明

特殊的,如果某张物理表为注册上挂指标的来源表,则is_from_logical字段取值为Y。

create table if not exists dim_dataphin_column(
	tenant_id 										bigint comment '租户id',
 	project_id 										bigint comment 'Dataphin项目ID',
	project_name 									string comment 'Dataphin项目名称', 
  table_name										string comment '表名称',
  column_name										string comment '列名称',
  column_type										string comment '列数据类型',
  column_comment								string comment '列注释或分区键注释',				
  column_seq										bigint comment '列顺序',
  is_pk													string comment '是否分区字段,Y/N',
	is_from_logical								string comment '是否是规范产生的物理表,Y/N',
	is_partitioned								string comment '是否为分区表,Y/N',
	compute_engine_id						 	bigint comment '计算源ID',
  compute_engine_name						string comment '计算源名称',
  env														string comment '项目环境,DEV:开发环境,PROD:生产环境',
  compute_engine_support_type		string comment '计算源使用类型,OFFLINE:离线引擎,REALTIME:实时引擎,ANALYTICAL:加速引擎',
  compute_engine_desc						string comment '计算源描述',
  db_type												string comment '计算源类型,max_compute/hadoop/flink/analyticdb_for_pg/HOLOGRES/vvp',
  db_name												string comment '计算源的物理空间名称,maxCompute/hive为project_name,ADB PG为库名称等',
  --table_id											string comment '废弃,置空',
  owner_id											string comment '表所有者ID',
  owner_name										string comment '表所有者名称',
  classify                      string comment '数据分类,S:公司数据,B:业务数据,C:个人数据,其余为自定义',
  security_level                string comment '安全等级,L1:对外公开,L2:对内公开,L3:机密数据,L4:绝密数据,其余为自定义'
) comment '物理表字段元数据'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

数据服务

dim_dataphin_service_logic_unit

create table if not exists dim_dataphin_service_logic_unit(
	tenant_id 										bigint comment '租户id',
 	logic_unit_id									bigint comment '服务单元ID',
 	logic_unit_no									string comment '服务单元标识',
	logic_unit_name								string comment '服务单元名称',
	logic_unit_type								string comment '服务单元类型,SINGLE_PHYSICAL:单物理表服务单元,MULTI_PHYSICAL:多物理表服务单元,DATAPHIN_LOGIC:Dataphin逻辑表服务单元',
	logic_unit_desc								string comment '服务单元描述',
  model_type										string comment '模式,basic:基础模式,prodDev:开发生产模式',
	status												string comment '1:上线,2:下线',
  delete_flag										string comment '逻辑删除标志,0表示未删除,1表示删除',
  logic_unit_version						bigint comment '服务单元版本号',
	lock_version									bigint comment '版本锁',
	group_id											bigint comment '所属分组ID',
	group_name										string comment '分组名称',
	record_num										bigint comment '返回数据最大条数',
	source_tables									string comment '来源表,多来源表以分号分隔',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	create_time                   string comment '创建时间',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '生产环境数据服务单元表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_service_logic_unit_column

create table if not exists dim_dataphin_service_logic_unit_column(
	tenant_id 										bigint comment '租户id',
  data_source_id      					bigint comment '数据源ID',
  data_source_type    					string comment '数据源类型,MYSQL/ADS/ES/HBASE/Oracle/SqlSever/PgSQL/MongoDB/impala/adb3.0',
  data_source_name      				string comment '数据源名称',
  data_source_url       				string comment '数据源地址',
  table_name           					string comment '物理表名',
  original_column      					string comment '原字段',
  original_column_type 					string comment '原字段类型',
  mapping_column       					string comment '映射字段',
  column_type          					string comment '服务单元字段类型',
  datetime_format          			string comment '日期格式',
  delete_flag										string comment '逻辑删除标志,0表示未删除,1表示删除',
	family_name                   string comment '列簇名称(hbase类型数据源列簇名)',
  rowkey_sort                   string comment '排序(hbase数据源rowkey字段排序)',
  rowkey_separator              string comment 'hbase的rowkey分隔符',
  is_master_table               string comment '是否主表,Y/N',
  is_relate_column              string comment '是否关联字段,Y/N',
  logic_unit_id									bigint comment '服务单元ID',
 	logic_unit_no									string comment '服务单元ID',
	logic_unit_name								string comment '服务单元名称',
	logic_unit_type								string comment '服务单元类型,SINGLE_PHYSICAL:单物理表服务单元,MULTI_PHYSICAL:多物理表服务单元,DATAPHIN_LOGIC:Dataphin逻辑表服务单元',
	logic_unit_status							string comment '1:上线,2:下线',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	create_time                   string comment '创建时间',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '生产环境数据服务单元字段表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_service_api

create table if not exists dim_dataphin_service_api(
	tenant_id 										bigint comment '租户id',
  api_id												bigint comment 'api ID',
	api_no												string comment 'api标识',
	api_name											string comment 'api名称',
	request_method								string comment '调用方法:GET/LIST',
	update_rate										string comment '更新频次:DAY/HOUR/MIN',
	api_desc											string comment 'API描述',
	return_type										string comment '返回类型:JSON',
	protocol											string comment '协议:HTTPS/HTTP/HTTP&HTTPS',
	sql_statement									string comment 'sql语句',
	api_version										bigint comment 'api版本号',
	lock_version									bigint comment '版本锁',
	document_url									string comment 'api文档地址',
	create_type										string comment '创建类型:SELFDEFINE/GUIDE',
  call_time											bigint comment 'API调用次数',
	api_gw_group_id								bigint comment 'api网关返回的分组ID',
	api_gw_id											string comment 'api网关返回的api唯一标识',
	status												string comment '1:上线,2:下线',
  delete_flag										string comment '逻辑删除标志,0表示未删除,1表示删除',
	max_return_num								bigint comment '返回数据最大条数',
	api_timeout										bigint comment 'API超时时间,单位秒',
  logic_unit_no									string comment '服务单元ID',
	logic_unit_name								string comment '服务单元名称',
	logic_unit_type								string comment '服务单元类型,SINGLE_PHYSICAL:单物理表服务单元,MULTI_PHYSICAL:多物理表服务单元,DATAPHIN_LOGIC:Dataphin逻辑表服务单元',
	logic_unit_desc								string comment '服务单元描述',
  model_type										string comment '模式,basic:基础模式,prodDev:开发生产模式',
  logic_unit_version						bigint comment '服务单元版本号',
	group_id											bigint comment '所属分组ID',
	group_name										string comment '分组名称',
	source_tables									string comment '来源表,多来源表以分号分隔',
	api_type											string comment 'api类型,NORMAL/DIRECTAPI/LOGICTABLE',
	data_source_id      					bigint comment 'DIRECTAPI:数据源ID',
  data_source_type    					string comment 'DIRECTAPI:数据源类型,impala/HoloLens',
  data_source_name      				string comment 'DIRECTAPI:数据源名称',
  biz_unit_name 								string comment 'LOGICTABLE:业务板块名',
	table_name										string comment 'LOGICTABLE:逻辑表名',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	create_time                   string comment '创建时间',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '数据服务API表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_service_api_param

create table if not exists dim_dataphin_service_api_param
(
    id                   bigint comment '自增id,唯一键',
    tenant_id            bigint comment '租户ID',
    api_id               bigint comment '关联dim_dataphin_service_api的app_id',
    api_no				 			 string comment 'api标识',
    api_name			 			 string comment 'api名称',
    param_name           string comment '参数名称',
    param_type           string comment '参数类型',
    type                 bigint comment '参数种类:1.返回参数、2.请求参数、3.公共参数(系统默认的入参,如分页参数、排序参数等)',
    sample               string comment '参数示例',
    param_desc           string comment '参数描述',
    must                 bigint comment '参数是否必填:0.非必填、1.必填',
    date_format          string comment '日期格式',
    operator             string comment '操作符',
    mapping_column       string comment '原字段(指服务单元字段名称,非数据库字段,API向导模式取别名)',
    api_request_method	 string comment '调用方法:GET/LIST,同im_dataphin_service_api的request_method',
    api_desc			 			 string comment 'API描述',
    api_create_type		 	 string comment '创建类型:SELFDEFINE/GUIDE/DIRECTAPI,同im_dataphin_service_api的create_type',
    api_status			     string comment 'API状态,1:上线,2:下线,同im_dataphin_service_api的status',
    api_delete_flag		   string comment 'API逻辑删除标志,0表示未删除,1表示删除,同im_dataphin_service_api的delete_flag',
    create_person_id     string comment '创建人ID',
    create_person        string comment '创建人名称',
    create_time          string comment '创建时间',
    modifier_id          string comment '最近一次修改者ID',
    modifier_name        string comment '最近一次修改者名称',
    modified_time        string comment '最近一次修改时间',
    delete_flag			 		 string comment '逻辑删除标志,0表示未删除,1表示删除',
    proj_id              bigint comment '数据服务项目ID',
    proj_name            string comment '数据服务项目名称'
)comment '数据服务API参数表'
partitioned by (ds string comment '业务日期:yyyymmdd')
stored as orc;

dim_dataphin_service_app

create table if not exists dim_dataphin_service_app(
	tenant_id 										bigint comment '租户id',
	app_id												bigint comment 'app ID',
	app_name											string comment 'app名称',
  app_key												bigint comment 'AppKey',
	app_gw_id											string comment 'api网关返回的api唯一标识',
	env														string comment '环境标识:1预发,2生产',
  group_id											bigint comment '分组ID',
  group_name										string comment '分组名称',
	app_secret        						string comment 'sk值,不使用网关的情况由mgmt产生这个值',
  enable_white_list 						string comment '是否启用白名单:1禁用,2启用',
  white_list        						string comment 'ip白名单列表',
  delete_flag										string comment '逻辑删除标志,0表示未删除.1表示删除',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	create_time                   string comment '创建时间',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '数据服务APP表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_service_app_api

create table if not exists dim_dataphin_service_app_api(
	tenant_id 										bigint comment '租户id',
  api_id												bigint comment 'api id',
	api_no												string comment 'api标识',
	api_name											string comment 'api名称',
  api_version										bigint comment 'api版本号',
  app_id												bigint comment 'app ID',
	app_name											string comment 'app名称',
  app_key												bigint comment 'AppKey',
	app_gw_id											string comment 'api网关返回的api唯一标识',
  delete_flag										string comment '逻辑删除标志,0表示未删除,1表示删除',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	create_time                   string comment '创建时间',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '数据服务APP与API关系表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dws_dataphin_service_api_mi

create table if not exists dws_dataphin_service_api_mi(
  	tenant_id 										bigint comment '租户id',
		api_no												string comment 'api标识',
		api_name											string comment 'api名称',
		minute												string comment '统计时间,yyyy_MMdd_HHmm',
  	app_key												string comment 'APP_KEY',
  	client_ip											string comment '客户端IP',
		total_count          					bigint comment '调用总数',
		offline_count        					bigint comment '离线数',
		client_fail_count    					bigint comment '客户端失败数',
		total_time_cost      					bigint comment '接口总耗时(包括失败的)',
		total_succ_time_cost 					bigint comment '成功调用的总耗时',
    api_ex_count                  bigint comment 'api调用异常数'
)comment '数据服务API调用分钟级别统计表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_service_api_direct

create table if not exists dim_dataphin_service_api_direct(
	tenant_id 										bigint comment '租户id',
  api_id												bigint comment 'api id',
	api_no												string comment 'api标识',
	api_name											string comment 'api名称',
  model_type										string comment '模式,basic:基础模式,prodDev:开发生产模式',
	data_source_id      					bigint comment '数据源ID',
  data_source_type    					string comment '数据源类型,impala/HoloLens',
  data_source_name      				string comment '数据源名称',
  delete_flag										string comment '逻辑删除标志,0表示未删除,1表示删除',
	creator_id                    string comment '创建人ID',
	creator_name                  string comment '创建人',
	create_time                   string comment '创建时间',
	modifier_id                   string comment '最近一次修改者ID',
  modifier_name                 string comment '最近一次修改者名称',
	modified_time									string comment '最近一次修改时间',
  proj_id                       bigint comment '数据服务项目ID',
  proj_name                     string comment '数据服务项目名称'
) comment '直连数据源API表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

血缘

dim_dataphin_lineage_node_column

说明

节点+输入表+输入字段+输出表+输出字段。

create table if not exists dim_dataphin_lineage_node_column(
  	tenant_id 											bigint comment '租户id',
		node_id													string comment '节点ID',
		node_name												string comment '节点名称',
  	node_env												string comment '节点环境,PROD/DEV',
		node_operator_type							string comment '任务操作类型 DATAX/DLINK/ONE_SERVICE_SQL/VIRTUAL/PYTHON/SHELL',
		lineage_type                    string comment '血缘类型,SELECT/OTHER',
		--input_column_id									string comment '废弃,置空',
		input_column_name								string comment '输入字段名',
  	--output_column_id								string comment '废弃,置空',
		output_column_name							string comment '输出字段名',
    --input_table_id									string comment '废弃,置空',
		input_table_type								string comment '输入表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		input_table_name								string comment '输入表名',
		input_data_domain_id						bigint comment '输入表数据域ID',
		input_data_domain_name					string comment '输入表数据域名称',
		input_data_domain_abbreviation	string comment '输入表数据域简称',
		input_data_domain_name_cn				string comment '输入表数据域中文名',
		--output_table_id									string comment '废弃,置空',
		output_table_type								string comment '输出表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		output_table_name								string comment '输出表名',
		output_data_domain_id						bigint comment '输出表数据域ID',
		output_data_domain_name					string comment '输出表数据域名称',
		output_data_domain_abbreviation	string comment '输出表数据域简称',
		output_data_domain_name_cn			string comment '输出表数据域中文名',
		input_project_id								bigint comment '输入项目空间ID',
		input_project_name							string comment '输入项目空间英文名',
		input_project_cn_name						string comment '输入项目空间中文名',
		input_project_ns_tag						string comment '输入项目空间类型 BASE/PUBLIC/APPLICATION',
		output_project_id								bigint comment '输出项目空间ID',
		output_project_name							string comment '输出项目空间英文名',
		output_project_cn_name					string comment '输出项目空间中文名',
 		output_project_ns_tag						string comment '输出项目空间类型 BASE/PUBLIC/APPLICATION',
		input_biz_unit_id								bigint comment '输入业务板块ID',
		input_biz_unit_name							string comment '输入业务板块名称',
		output_biz_unit_id							bigint comment '输出业务板块ID',
		output_biz_unit_name						string comment '输出业务板块名称',
		input_env												string comment '输入环境 PROD/DEV',
		output_env											string comment '输出环境 PROD/DEV',
--		input_data_source_id						bigint comment '输入数据源ID',
--		input_data_source_type					string comment '输出数据源类型',
--		input_data_source_name					string comment '输出数据源名称',
--		output_data_source_id						bigint comment '输出数据源ID',
--		output_data_source_type					string comment '输出数据源类型',
--		output_data_source_name					string comment '输出数据源名称',
		gmt_create											string comment '创建时间',
		gmt_modified										string comment '修改时间'
)comment '节点+输入表+输入字段+输出表+输出字段 粒度血缘关系'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_lineage_node_table

说明

节点+输入表+输出表。

create table if not exists dim_dataphin_lineage_node_table(
  	tenant_id 											bigint comment '租户id',
		node_id													string comment '节点ID',
		node_name												string comment '节点名称',
  	node_env												string comment '节点环境,PROD/DEV',
		node_operator_type							string comment '任务操作类型 DATAX/DLINK/ONE_SERVICE_SQL/VIRTUAL/PYTHON/SHELL',
		--input_table_id									string comment '废弃,置空',
		input_table_type								string comment '输入表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		input_table_name								string comment '输入表名',
		input_data_domain_id						bigint comment '输入表数据域ID',
		input_data_domain_name					string comment '输入表数据域名称',
		input_data_domain_abbreviation	string comment '输入表数据域简称',
		input_data_domain_name_cn				string comment '输入表数据域中文名',
		--output_table_id									string comment '废弃,置空',
		output_table_type								string comment '输出表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		output_table_name								string comment '输出表名',
		output_data_domain_id						bigint comment '输出表数据域ID',
		output_data_domain_name					string comment '输出表数据域名称',
		output_data_domain_abbreviation	string comment '输出表数据域简称',
		output_data_domain_name_cn			string comment '输出表数据域中文名',
		input_project_id								bigint comment '输入项目空间ID',
		input_project_name							string comment '输入项目空间英文名',
		input_project_cn_name						string comment '输入项目空间中文名',
		input_project_ns_tag						string comment '输入项目空间类型 BASE/PUBLIC/APPLICATION',
		output_project_id								bigint comment '输出项目空间ID',
		output_project_name							string comment '输出项目空间英文名',
		output_project_cn_name					string comment '输出项目空间中文名',
 		output_project_ns_tag						string comment '输出项目空间类型 BASE/PUBLIC/APPLICATION',
		input_biz_unit_id								bigint comment '输入业务板块ID',
		input_biz_unit_name							string comment '输入业务板块名称',
		output_biz_unit_id							bigint comment '输出业务板块ID',
		output_biz_unit_name						string comment '输出业务板块名称',
		input_env												string comment '输入环境 PROD/DEV',
		output_env											string comment '输出环境 PROD/DEV',
--		input_data_source_id						bigint comment '输入数据源ID',
--		input_data_source_type					string comment '输出数据源类型',
--		input_data_source_name					string comment '输出数据源名称',
--		output_data_source_id						bigint comment '输出数据源ID',
--		output_data_source_type					string comment '输出数据源类型',
--		output_data_source_name					string comment '输出数据源名称',
		gmt_create											string comment '创建时间',
		gmt_modified										string comment '修改时间'
)comment '节点+输入表+输出表 粒度血缘关系'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_lineage_table

说明

输入表+输出表。

create table if not exists dim_dataphin_lineage_table(
  	tenant_id 											bigint comment '租户id',
		--input_table_id									string comment '废弃,置空',
		input_table_type								string comment '输入表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		input_table_name								string comment '输入表名',
		input_data_domain_id						bigint comment '输入表数据域ID',
		input_data_domain_name					string comment '输入表数据域名称',
		input_data_domain_abbreviation	string comment '输入表数据域简称',
		input_data_domain_name_cn				string comment '输入表数据域中文名',
		--output_table_id									string comment '废弃,置空',
		output_table_type								string comment '输出表类型 PHYSICAL_TABLE/DIM_LOGIC_TABLE/FACT_LOGIC_TABLE/SUM_LOGIC_TABLE/REAL_TIME_LOGIC_TABLE',
		output_table_name								string comment '输出表名',
		output_data_domain_id						bigint comment '输出表数据域ID',
		output_data_domain_name					string comment '输出表数据域名称',
		output_data_domain_abbreviation	string comment '输出表数据域简称',
		output_data_domain_name_cn			string comment '输出表数据域中文名',
		input_project_id								bigint comment '输入项目空间ID',
		input_project_name							string comment '输入项目空间英文名',
		input_project_cn_name						string comment '输入项目空间中文名',
		input_project_ns_tag						string comment '输入项目空间类型 BASE/PUBLIC/APPLICATION',
		output_project_id								bigint comment '输出项目空间ID',
		output_project_name							string comment '输出项目空间英文名',
		output_project_cn_name					string comment '输出项目空间中文名',
 		output_project_ns_tag						string comment '输出项目空间类型 BASE/PUBLIC/APPLICATION',
		input_biz_unit_id								bigint comment '输入业务板块ID',
		input_biz_unit_name							string comment '输入业务板块名称',
		output_biz_unit_id							bigint comment '输出业务板块ID',
		output_biz_unit_name						string comment '输出业务板块名称',
		input_env												string comment '输入环境 PROD/DEV',
		output_env											string comment '输出环境 PROD/DEV',
		gmt_create											string comment '创建时间',
		gmt_modified										string comment '修改时间'
)comment '输入表+输出表 粒度血缘关系'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

安全

dim_dataphin_security_classify

create table if not exists dim_dataphin_security_classify(
  	tenant_id 									bigint comment '租户ID',
  	classify_id									bigint comment '分类ID',
  	classify_name								string comment '分类名称',
  	classify_short_name					string comment '分类简称',
  	classify_desc								string comment '分类描述',
 		creator_id                  string comment '创建人ID',
		creator_name                string comment '创建人',
		modifier_id                 string comment '最近一次修改者ID',
  	modifier_name               string comment '最近一次修改者名称',
		gmt_create									string comment '创建时间',
		gmt_modified								string comment '修改时间',
    status				        			string comment '分类状态,ENABLE/DISABLE',
    level_id										bigint comment '分级ID',
  	level_name									string comment '分级名称',
  	level_index									bigint comment '分级级别',
    parent_path                 string comment '存储分类目录的路径'
)comment '安全数据分类表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_security_level

create table if not exists dim_dataphin_security_level(
  	tenant_id 												bigint comment '租户ID',
  	level_id													bigint comment '分级ID',
  	level_name												string comment '分级名称',
  	level_short_name									string comment '分级简称',
  	level_desc												string comment '分级描述',
  	level_index												bigint comment '分级级别',
 		creator_id                    		string comment '创建人ID',
		creator_name                  		string comment '创建人',
		modifier_id                   		string comment '最近一次修改者ID',
  	modifier_name                 		string comment '最近一次修改者名称',
		gmt_create												string comment '创建时间',
		gmt_modified											string comment '修改时间'
)comment '安全数据等级表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_security_identify_rule

create table if not exists dim_dataphin_security_identify_rule(
  	tenant_id 												bigint comment '租户ID',
 		identify_rule_id             			bigint comment '识别规则ID',
    identify_rule_name                string comment '识别规则名称',
    biz_unit_scope_type          			string comment '废弃字段[v3.11] 业务板块范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    biz_unit_ids                 			string comment '废弃字段[v3.11] 枚举业务板块ID',
    custom_biz_unit_expression   			string comment '废弃字段[v3.11] 块名称匹配正则',
    project_scope_type           			string comment '废弃字段[v3.11] 项目范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    project_ids                  			string comment '废弃字段[v3.11] 枚举项目ID',
    custom_project_expression    			string comment '废弃字段[v3.11] 项目名称匹配正则',
    table_scope_type             			string comment '废弃字段[v3.11] 表范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    custom_table_expression      			string comment '废弃字段[v3.11] 表名称匹配正则',
    enable_by_content            			string comment '废弃字段[v3.11] 开启内容识别',
    content_method_name          			string comment '废弃字段[v3.11] 内容识别方法名称',
    custom_content_expression    			string comment '废弃字段[v3.11] 自定义内容识别正则',
    enable_by_field_name         			string comment '废弃字段[v3.11] 开启字段名识别',
    custom_field_name_expression 			string comment '废弃字段[v3.11] 自定义字段名识别正则',
  	priority_level										bigint comment '优先级',
  	status												    string comment '状态,ENABLE:启用状态,DISABLE:禁用状态',
  	level_id													bigint comment '分级ID',
  	level_name												string comment '分级名称',
  	level_index												bigint comment '分级级别',
 		classify_id												bigint comment '分类ID',
  	classify_name											string comment '分类名称',
 		owner_id                    			string comment '所有者ID',
		owner_name                  			string comment '所有者名称',
		creator_id                    		string comment '创建人ID',
		creator_name                  		string comment '创建人',
		modifier_id                   		string comment '最近一次修改者ID',
  	modifier_name                 		string comment '最近一次修改者名称',
		gmt_create							    			string comment '创建时间',
		gmt_modified						    			string comment '修改时间',
    classify_ids											string comment '分类ID列表,逗号分隔'
)comment '安全识别规则表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_security_label

说明

该表日全量更新。

create table if not exists dim_dataphin_security_label (
    tenant_id           bigint comment '租户ID'
   ,label_id            string comment '识别标签ID'
   ,identify_rule_id    string comment '识别规则ID'
   ,identify_rule_name  string comment '识别规则名称'
   ,identify_rate       double comment '识别率'
   ,identify_is_custom  string comment '自定义识别规则,TRUE/FALSE'
   ,biz_unit_id         bigint comment '业务板块ID'
   ,biz_unit_name       string comment '业务板块名称'
   ,project_id          bigint comment '项目ID'
   ,project_name        string comment '项目名称'
   ,table_id            string comment '表ID,对应dim_dataphin_table表的table_id'
   ,table_catalog       string comment '表的项目或者板块名'
   ,table_name          string comment '表名'
   ,table_desc          string comment '表描述'
   ,table_partitioned   string comment '是否分区表,TRUE|FALSE'
   ,table_type          string comment '表类型,LOGIC_TABLE:逻辑表,LOGIC_DIM_TABLE:维度逻辑表,LOGIC_FACT_TABLE:事实逻辑表,LOGIC_SUM_TABLE:汇总逻辑表,PHYSICAL_TABLE:物理表,REALTIME_LOGICAL_TABLE:实时元表'
   ,table_env           string comment '表环境 PROD/DEV'
   ,field_id            string comment '字段ID,对应dim_dataphin_table表的column_id'
   ,field_name          string comment '字段名称'
   ,field_desc          string comment '字段描述'
   ,biz_date            string comment 'biz_date'
   ,status              string comment '状态,ENABLE:启用状态,DISABLE:禁用状态'
   ,level_id            bigint comment '等级ID'
   ,level_name          string comment '等级名称'
   ,level_index         bigint comment '等级'
   ,classify_id         bigint comment '分类ID'
   ,classify_name       string comment '分类名称'
   ,creator_id          string comment '创建人ID'
   ,creator_name        string comment '创建人'
   ,modifier_id         string comment '最近一次修改者ID'
   ,modifier_name       string comment '最近一次修改者名称'
   ,gmt_create          string comment '创建时间'
   ,gmt_modified        string comment '修改时间'
   ,classfy_parent_path string comment '分类目录名称'
   ,classfy_level1_path string comment '分类一级目录名称'
   ,record_from         string comment '识别结果的来源,CUSTOM:手动指定,AUTO_SCAN:自动识别,AUTO_INHERIT:自动继承'
   ,field_from          string comment '来源字段名称列表,record_from=2时有值,逗号分隔'

)
comment '安全识别记录表'
partitioned by (
    ds string comment '分区字段,yyyymmdd'
) stored as orc;

dim_dataphin_security_desensitize_rule

create table if not exists dim_dataphin_security_desensitize_rule(
  	tenant_id 											bigint comment '租户ID',
  	desensitize_rule_id							bigint comment '脱敏规则ID',
  	desensitize_rule_name						string comment '脱敏规则名称',
 		identify_rule_id             		bigint comment '废弃字段[v3.11] 识别规则ID',
    identify_rule_name              string comment '废弃字段[v3.11] 识别规则名称',
 		enable_by_temp_query       			string comment '开启即席查询脱敏',
    enable_by_read_write       			string comment '开启写开发表脱敏',
    algorithm_type             			string comment '算法类型',
    algorithm_code             			string comment '算法代码',
    rule_method_text_param     			string comment '算法文本参数',
    rule_method_selected_param 			string comment '算法密钥参数',
  	status													string comment '状态,ENABLE:启用状态,DISABLE:禁用状态',
 		owner_id                    		string comment '所有者ID',
		owner_name                  		string comment '所有者名称',
		creator_id                    	string comment '创建人ID',
		creator_name                  	string comment '创建人',
		modifier_id                   	string comment '最近一次修改者ID',
  	modifier_name                 	string comment '最近一次修改者名称',
		gmt_create											string comment '创建时间',
		gmt_modified										string comment '修改时间',
  	classify_id					        		bigint comment '分类ID',
  	classify_name				        		string comment '分类名称'
)comment '安全脱敏规则表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

dim_dataphin_security_desensitize_rule_white_list

create table if not exists dim_dataphin_security_desensitize_rule_white_list(
  	tenant_id 											bigint comment '租户ID',
  	desensitize_white_list_rule_id	bigint comment '白名单规则ID',
 		identify_rule_id             		bigint comment '废弃字段[v3.11] 识别规则ID',
    identify_rule_name              string comment '废弃字段[v3.11] 识别规则名称',
 		filter_account                 	string comment '过滤账号列表', 
    filter_by_temp_query           	string comment '开启过滤即席查询', 
    filter_by_read_write           	string comment '开启过滤写开发', 
  	biz_unit_scope_type          		string comment '业务板块范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    biz_unit_ids                 		string comment '废弃字段[v3.11] 枚举业务板块ID',
    custom_biz_unit_expression   		string comment '块名称匹配正则',
    project_scope_type           		string comment '项目范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    project_ids                  		string comment '废弃字段[v3.11] 枚举项目ID',
    custom_project_expression    		string comment '项目名称匹配正则', 
    table_scope_type             		string comment '表范围,ALL:所有,ENUMS:枚举,EXPRESSION:表达式',
    custom_table_expression      		string comment '废弃字段[v3.11] 表名称匹配正则',
    start_time                     	string comment '生效开始时间', 
    end_time                       	string comment '生效结束时间',
  	identify_rule_exists            string comment '识别规则是否存在', 
  	status													string comment '状态,ENABLE:启用状态,DISABLE:禁用状态',
 		owner_id                    		string comment '所有者ID',
		owner_name                  		string comment '所有者名称',
		creator_id                    	string comment '创建人ID',
		creator_name                  	string comment '创建人',
		modifier_id                   	string comment '最近一次修改者ID',
  	modifier_name                 	string comment '最近一次修改者名称',
		gmt_create											string comment '创建时间',
		gmt_modified										string comment '修改时间',
  	classify_id					        		bigint comment '分类ID',
  	classify_name				        		string comment '分类名称'
)comment '安全脱敏规则白名单表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

质量

dim_dataphin_dp_quality_watch

create table if not exists dim_dataphin_dp_quality_watch
(
    tenant_id                   bigint comment '租户ID',
    watch_id                    bigint comment '监控对象ID',
    watch_type                  string comment '监控对象类型,INDEX:指标监控,TABLE:Dataphin表监控,REALTIME_LOGICAL_TABLE:实时元表监控,DATASOURCE:数据源监控,DATASOURCE_TABLE:全域表监控',
    table_id                    string comment '表id,watch_type=TABLE&table_type=PHYSICAL_TABLE:dim_dataphin_table表;watch_type in(TABLE,INDEX)&is_logical_table:dim_dataphin_model',
    table_type                  string comment '表类型,LOGIC_DIM_TABLE:维度逻辑表,LOGIC_FACT_TABLE:事实逻辑表,LOGIC_SUM_TABLE,汇总逻辑表,LOGIC_LABEL_TABLE:标签逻辑表,PHYSICAL_TABLE:物理表,REALTIME_LOGICAL_TABLE:实时逻辑表',
    is_logical_table            string comment '是否逻辑表,Y/N',
    table_env                   string comment '表环境',
    table_name                  string comment '表名称',
    table_catalog               string comment '表分组,watch_type=TABLE&table_type=PHYSICAL_TABLE:project_name;watch_type in(TABLE,INDEX)&is_logical_table:biz_unit_name',
    table_description           string comment '表描述',
    table_is_partitioned        string comment '是否分区表,Y/N',
    table_owner_id              string comment '表负责人ID',
    table_owner_name            string comment '表负责人名称',
    biz_unit_id                 bigint comment '表归属业务板块ID',
    biz_unit_name               string comment '表归属业务板块名称',
    project_id                  bigint comment '表归属项目ID',
    project_name                string comment '表归属项目名称',
    data_source_id              bigint comment '数据源ID,dim_dataphin_data_source表的data_source_id',
    data_source_type            string comment '数据源类型,枚举值见dim_dataphin_data_source表的data_source_type',
    data_source_env             string comment '数据源环境',
    data_source_name            string comment '数据源名称',
    data_source_scope           string comment '数据源适用范围',
    data_source_owner           string comment '数据源负责人',
    data_source_from            string comment '数据源来源',
    index_id                    string comment '指标ID,watch_type=INDEX:dim_dataphin_derived_index表的派生指标guid',
    index_name                  string comment '指标名称',
    index_name_cn               string comment '指标中文名',
    index_env                   string comment '指标环境',
    index_owner                 string comment '指标责任人',
    index_sum_logic_table_name  string comment '指标汇总逻辑表名',
    index_desc                  string comment '指标描述',
    index_compute_type          string comment '指标计算类型',
    index_granularity_id        bigint comment '指标粒度ID',
    index_granularity_cn        string comment '指标粒度中文',
    index_period_attribute      string comment '指标时间属性',
    index_catalog               string comment '通常为业务板块名称',
    quality_owner_id            string comment '质量负责人ID',
    quality_owner_name          string comment '质量负责人名称',
    watch_status                string comment '生效状态, ENABLE:开启,DISABLE:关闭',
    creator_id                  string comment '创建人ID',
    creator_name                string comment '创建人名称',
    gmt_create                  string comment '创建时间',
    modifier_id                 string comment '最近修改人Id',
    modifier_name               string comment '最近修改人名称',
    gmt_modified                string comment '最近修改时间'
) comment '质量监控对象表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_dp_quality_rule

说明

如需要数据源或数据源表或指标等监控对象的详细信息, 可以通过tenant_id/watch_id关联dim_dataphin_dp_quality_watch表获取。

create table if not exists dim_dataphin_dp_quality_rule
(
    tenant_id                   bigint comment '租户ID',
    rule_id                     bigint comment '规则ID',
    rule_name                   string comment '规则名称',
    strength                    string comment '规则强弱程度,STRONG:强,WEAK:弱',
    rule_desc                   string comment '规则描述',
    rule_catalogs               string comment '规则分类标签列表,逗号分隔,CONSISTENT:一致性,EFFECTIVE:有效性,TIMELINESS:及时性,ACCURATE:准确性,UNIQUENESS:唯一性,COMPLETENESS:完整性,STABILITY:稳定性,CUSTOM:自定义',
    template_id                 bigint comment '模板ID',
    template_type               string comment '模板类型',
    template_name               string comment '模板名称',
    watch_id                    bigint comment '监控表ID',
    watch_type                  string comment '监控对象类型,INDEX:指标监控,TABLE:Dataphin表监控,REALTIME_LOGICAL_TABLE:实时元表监控,DATASOURCE:数据源监控,DATASOURCE_TABLE:全域表监控',
    table_id                    string comment '表id,watch_type=TABLE&table_type=PHYSICAL_TABLE:dim_dataphin_table表;watch_type in(TABLE,INDEX)&is_logical_table:dim_dataphin_model',
    table_type                  string comment '表类型,LOGIC_DIM_TABLE:维度逻辑表,LOGIC_FACT_TABLE:事实逻辑表,LOGIC_SUM_TABLE,汇总逻辑表,LOGIC_LABEL_TABLE:标签逻辑表,PHYSICAL_TABLE:物理表,REALTIME_LOGICAL_TABLE:实时逻辑表',
    is_logical_table            string comment '是否逻辑表,Y/N',
    table_env                   string comment '表环境,PROD/DEV',
    table_name                  string comment '表名称',
    table_catalog               string comment '表分组,watch_type=TABLE&table_type=PHYSICAL_TABLE:project_name;watch_type in(TABLE,INDEX)&is_logical_table:biz_unit_name',
    table_description           string comment '表描述',
    table_is_partitioned        string comment '是否分区表,Y/N',
    biz_unit_id                 bigint comment '表归属业务板块ID',
    biz_unit_name               string comment '表归属业务板块名称',
    project_id                  bigint comment '表归属项目ID',
    project_name                string comment '表归属项目名称',
    validate_object_type        string comment '校验对象类型,TABLE:表规则,COLUMN:字段规则,DATASOURCE:数据源类型规则,TABLE:数据源中表监控规则,REALTIME:实时规则,INDEX:指标类型规则,CHAIN:离线链路,UNKNOWN:未知类型',
    validate_object_name        string comment '校验对象类名称',
    rule_properties             string comment '动态模板规则配置键值对',
    enable_error_archive        string comment '是否开启异常归档,Y/N',
    validate_condition          string comment '校验条件',
    rule_status                 string comment '规则状态,ENABLE:开启,DISABLE:关闭',
    schedule_ids                string comment '绑定的调度ID列表(当前置空)',
    alert_id                    bigint comment '告警设置ID',
    alert_scope                 string comment 'WATCH/RULE',
    alert_users                 string comment '告警用户ID,格式为json',
    alert_users_channels        string comment '告警用户渠道,VOICE:语音提醒,SMS:短信提醒,MAIL:邮件提醒,DINGTALK_ROBOT:钉钉机器人,DINGDING:钉钉.格式为json',
    alert_duties                string comment '告警值班表',
    alert_duties_channels       string comment '告警值班表渠道,枚举同alert_users_channels',
    alert_quality_owner         string comment '质量负责人告警,Y/N',
    alert_quality_owner_channels string comment '质量负责人告警渠道,枚举同alert_users_channels',
    creator_id                  string comment '创建人ID',
    creator_name                string comment '创建人名称',
    gmt_create                  string comment '创建时间',
    modifier_id                 string comment '最近修改人Id',
    modifier_name               string comment '最近修改人名称',
    gmt_modified                string comment '最近修改时间',
    tag                         string comment '业务标签:DATA_STANDARD_MANUAL/DATA_STANDARD_AUTO/PIPELINE',
    tag_unique_key              string comment 'tag的业务唯一标识',
    tag_properties              string comment 'tag的额外属性,json格式',
    archive_mode                string comment '归档模式:ERROR',
    archive_store_type          string comment '归档模式:FILE_SYSTEM',
    archive_table_name          string comment '归档表名称'
) comment '质量规则表'
partitioned by (ds string comment '分区字段')
stored as orc;

fct_dataphin_dp_quality_rule_task_di

create table if not exists fct_dataphin_dp_quality_rule_task_di
(
    tenant_id                   bigint comment '租户ID',
    rule_task_id                bigint comment '规则任务ID',
    watch_task_id               bigint comment '归属的监控表任务ID',
    watch_id                    bigint comment '监控对象ID',
    watch_detail                string comment '监控对象',
    watch_type                  string comment '监控对象类型',
    watch_task_status           string comment '状态,WAITING,RUNNING,SUCCESS,FAILED',
    data_source_id              bigint comment '数据源ID',
    data_source_type            string comment '数据源类型',
    data_source_scope           string comment '数据源用途',
    data_source_owner           string comment '数据源负责人',
    table_catalog               string comment '表catalog',
    table_name                  string comment '表名',
    table_type                  string comment '表类型',
    table_owner                 string comment '表负责人',
    biz_unit_name               string comment '板块名称',
    project_name                string comment '项目名称',
    template_id                 bigint comment '规则模板ID',
    template_type               string comment '规则模板类型',
    template_name               string comment '规则模板名称',
    template                    string comment '规则模板详情',
    rule_id                     bigint comment '规则ID',
    rule_detail                 string comment '规则详情',
    rule_name                   string comment '规则名称',
    rule_strength               string comment '规则的强弱程度',
    rule_catalogs               string comment '规则分类标签列表,逗号分隔,CONSISTENT:一致性,EFFECTIVE:有效性,TIMELINESS:及时性,ACCURATE:准确性,UNIQUENESS:唯一性,COMPLETENESS:完整性,STABILITY:稳定性,CUSTOM:自定义',
    validate_object_type        string comment '规则校验对象类型',
    validate_object_name        string comment '规则校验对象名称',
    biz_date                    string comment '业务日期',
    biz_date_format             string comment '业务日期格式',
    quality_owner_id            string comment '质量负责人ID',
    quality_owner_name          string comment '质量负责人名称',
    rule_task_status            string comment '状态,WAITING,RUNNING,SUCCESS,FAILED',
    execute_context             string comment '规则执行上下文',
    is_validate_result          string comment '校验规则是否通过,Y/N',
    start_time                  string comment '开始时间',
    end_time                    string comment '结束时间',
    error_code                  string comment '错误代码',
    schedule_id                 bigint comment '调度设置ID',
    schedule_type               string comment '调度设置类型',
    schedule_partition_values   string comment '调度分区计算值',
    schedule_params             string comment '调度参数值',
    trace_id                    string comment '跟踪ID,格式为 类型:id',
    creator_id                  string comment '创建人ID',
    creator_name                string comment '创建人名称',
    gmt_create                  string comment '创建时间',
    modifier_id                 string comment '最近修改人Id',
    modifier_name               string comment '最近修改人名称',
    gmt_modified                string comment '最近修改时间',
    tag                         string comment '业务标签:DATA_STANDARD_MANUAL/DATA_STANDARD_AUTO/PIPELINE',
    tag_unique_key              string comment 'tag的业务唯一标识'
) comment '质量规则任务表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_dp_quality_watch_member

create table if not exists dim_dataphin_dp_quality_watch_member
(
    tenant_id                   bigint comment '租户ID',
    watch_id                    bigint comment '监控对象ID',
    watch_type                  string comment '监控对象类型,INDEX:指标监控,TABLE:Dataphin表监控,REALTIME_LOGICAL_TABLE:实时元表监控,DATASOURCE:数据源监控,DATASOURCE_TABLE:全域表监控',
    watch_status                string comment '生效状态, ENABLE:开启,DISABLE:关闭',
    user_id                     string comment '用户ID',
    user_name                   string comment '用户名称',
    user_type                   string comment '成员类型,QUALITY_OWNER',
    creator_id                  string comment '创建人ID',
    creator_name                string comment '创建人名称',
    gmt_create                  string comment '创建时间',
    modifier_id                 string comment '最近修改人Id',
    modifier_name               string comment '最近修改人名称',
    gmt_modified                string comment '最近修改时间'
) comment '质量监控对象负责人表'
partitioned by (ds string comment '分区字段')
stored as orc
;

dim_dataphin_dp_quality_watch_alert

create table if not exists dim_dataphin_dp_quality_watch_alert
(
    tenant_id                   bigint comment '租户ID',
    alert_id                    bigint comment '告警设置ID,仅保存规则范围为所有规则的告警配置. 其余配置见dim_dataphin_dp_quality_watch_alert',
    alert_name                  string comment '告警名称',
    alert_scope                 string comment 'WATCH',
    alert_users                 string comment '告警用户ID,格式为json',
    alert_users_channels        string comment '告警用户渠道,VOICE:语音提醒,SMS:短信提醒,MAIL:邮件提醒,DINGTALK_ROBOT:钉钉机器人,DINGDING:钉钉.格式为json',
    alert_duties                string comment '告警值班表',
    alert_duties_channels       string comment '告警值班表渠道,枚举同alert_users_channels',
    alert_quality_owner         string comment '质量负责人告警,Y/N',
    alert_quality_owner_channels string comment '质量负责人告警渠道,枚举同alert_users_channels',
    custom_alert_scope          string comment '自定义告警范围,json格式,包含规则id和name',
    sort_index                  bigint comment '排序依据',
    watch_id                    bigint comment '监控表ID',
    watch_type                  string comment '监控对象类型,INDEX:指标监控,TABLE:Dataphin表监控,REALTIME_LOGICAL_TABLE:实时元表监控,DATASOURCE:数据源监控,DATASOURCE_TABLE:全域表监控',
    table_id                    string comment '表id,watch_type=TABLE&table_type=PHYSICAL_TABLE:dim_dataphin_table表;watch_type in(TABLE,INDEX)&is_logical_table=Y:dim_dataphin_model',
    table_type                  string comment '表类型,LOGIC_DIM_TABLE:维度逻辑表,LOGIC_FACT_TABLE:事实逻辑表,LOGIC_SUM_TABLE,汇总逻辑表,LOGIC_LABEL_TABLE:标签逻辑表,PHYSICAL_TABLE:物理表,REALTIME_LOGICAL_TABLE:实时逻辑表',
    table_env                   string comment '表环境,PROD/DEV',
    table_name                  string comment '表名称',
    table_catalog               string comment '表分组,watch_type=TABLE&table_type=PHYSICAL_TABLE:project_name;watch_type in(TABLE,INDEX)&is_logical_table:biz_unit_name',
    creator_id                  string comment '创建人ID',
    creator_name                string comment '创建人名称',
    gmt_create                  string comment '创建时间',
    modifier_id                 string comment '最近修改人Id',
    modifier_name               string comment '最近修改人名称',
    gmt_modified                string comment '最近修改时间'
) comment '质量监控对象告警配置表'
partitioned by (ds string comment '分区字段')
stored as orc
;

标准

dim_dataphin_datastandard_standard

create table if not exists dim_dataphin_datastandard_standard
(
    tenant_id                     bigint comment '租户ID',
    standard_id                   bigint comment '监控对象ID',
    standard_name				    			string comment '标准名称',
    standard_name_en			    		string comment '标准英文名称',
    standard_code				    			string comment '标准编码',
    standard_type				    			string comment '标准类型',
    version						    				bigint comment '版本号',
    standard_status				    		string comment '标准的状态,NOT_ACTIVATED:尚未生效,ACTIVE:生效中,EXPIRED:已停用, 发布到线上, 但是达到了失效时间',
    standard_stage				    		string comment '标准所属的阶段,DEV:草稿态/审批中,发布态,PROD: 已生效/未生效/停用',
    standard_set_id               bigint comment '标准集ID',
    standard_set_name			    		string comment '标准集名称',
    basic_info					    			string comment '标准基础信息',
    standard_set_reference		    string comment '标准所属的标准集的引用信息',
    attributes_with_value_config	string comment '标准的属性配置',
    owner_id					    				string comment '负责人ID',
    owner_name					    			string comment '负责人名称',
    creator_id					    			string comment '创建人ID',
    creator_name				    			string comment '创建人名称',
    modifier_id					    			string comment '最后修改人ID',
    modifier_name				    			string comment '最后修改人名称',
    gmt_create					    			string comment '创建时间',
    gmt_modified				    			string comment '修改时间',
    monitor_config                string comment '监控配置,json格式',
    standard_template_id          bigint comment '标准模板ID',
    standard_template_name        string comment '标准模板名称',
    standard_template_reference   string comment '标准所属的模板的引用信息'
)comment '标准表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_datastandard_rule

create table if not exists dim_dataphin_datastandard_rule
(
    tenant_id                   bigint comment '租户ID',
    standard_rule_id            bigint comment '落标规则ID',
    standard_rule_name          string comment '落标规则名称',
    standard_rule_desc          string comment '落标规则描述',
    version											bigint comment '版本号',
		asset_type									string comment '资产类型,INDEX:指标,COLUMN:字段',		
    --standard_set_id             bigint comment '标准集ID'(废弃字段),
    --standard_set_name						string comment '标准集名称'(废弃字段),
    basic_info									string comment '标准基础信息',
    evaluate_scope_config				string comment '评估范围信息',
    mapping_rule_config					string comment '落标规则信息',
  	is_valid										string comment '是否生效,Y/N',
    owner_id										string comment '负责人ID',
    owner_name									string comment '负责人名称',
    creator_id									string comment '创建人ID',
    creator_name								string comment '创建人名称',
    modifier_id									string comment '最后修改人ID',
    modifier_name								string comment '最后修改人名称',
    gmt_create									string comment '创建时间',
    gmt_modified								string comment '修改时间',
    standard_set_ids            string comment '标准集ID列表',
    standard_template_id        bigint comment '标准模板ID',
    standard_template_name      string comment '标准模板名称'
) comment '标准落标规则表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_datastandard_rule_asset_relation

说明
  • 标准落标结果推荐使用dim_dataphin_datastandard_asset_relation表, 不推荐使用该表。

  • 如果落标规则名称(standard_rule_name)的数据为空,表示该规则已被删除。

create table if not exists dim_dataphin_datastandard_rule_asset_relation
(
    tenant_id                 bigint comment '租户ID',
    guid                			string comment '资产GUID',
    asset_type               	string comment '资产类型,INDEX:指标,COLUMN:字段,其他为自定义',
    standard_id               bigint comment '标准ID',
    standard_name							string comment '标准名称',
    standard_name_en					string comment '标准英文名称',
    standard_status						string comment '标准的状态,NOT_ACTIVATED:尚未生效,ACTIVE:生效中,EXPIRED:已停用, 发布到线上, 但是达到了失效时间',
    standard_rule_id          bigint comment '落标规则ID或评估任务ID',
    standard_rule_name        string comment '落标规则名称,仅job_type为STANDARD_RULE时有值',
    standard_set_id           bigint comment '标准集ID',
    standard_set_name					string comment '标准集名称',
    gmt_create                string comment '创建时间',
    gmt_modified              string comment '最近修改时间',
    asset_snapshot            string comment '资产快照',
    standard_version          bigint comment '标准版本号',
    monitor_result            string comment '监控结果',
    monitor_status            string comment '监控结果的状态,NOT_CONFIGURED:未配置,PASSED:监控通过,FAILED:监控失败',
    is_latest_rule            string comment 'Y/N,对于标准/资产的对应关系,是否最近一次运行的落标规则',
    job_type                    string comment 'STANDARD_RULE:落标规则映射任务,EVALUATE_JOB:落标评估任务'
) comment '标准落标规则与资产映射表'
partitioned by (ds string comment '分区字段')
stored as orc;

dim_dataphin_datastandard_asset_relation

说明

标准落标结果推荐使用该表。

create table if not exists dim_dataphin_datastandard_asset_relation
(
    tenant_id                   bigint comment '租户ID',
    guid                				string comment '资产GUID',
    asset_type               		string comment '资产类型,INDEX:指标,COLUMN:字段,其他为自定义',
    asset_name                  string comment '资产对象名称',
    asset_belong_name           string comment '所属资产名称,如果是字段,此处为表的全名',
    standard_id                 bigint comment '标准ID',
    standard_name								string comment '标准名称',
    standard_name_en						string comment '标准英文名称',
    standard_status							string comment '标准的状态,NOT_ACTIVATED:尚未生效,ACTIVE:生效中,EXPIRED:已停用, 发布到线上, 但是达到了失效时间',
    standard_set_id             bigint comment '标准集ID',
    standard_set_name						string comment '标准集名称',
    gmt_create                  string comment '创建时间',
    gmt_modified                string comment '最近修改时间',
    standard_template_id        bigint comment '标准模板ID',
    standard_template_name      string comment '标准模板名称'
) comment '标准与资产映射结果表'
partitioned by (ds string comment '分区字段')
stored as orc
;

实时

dim_dataphin_stream_table

create table if not exists dim_dataphin_stream_table 
(
    tenant_id               bigint comment '租户id',
    project_id              bigint comment '项目id',
    project_name            string comment '项目名称',
    table_name              string comment '元表名称',
    env                     string comment '环境,DEV/PROD',
    owner_id                string comment '表所有者ID',
    owner_name			    		string comment '表所有者名称',
    compute_engine_id				bigint comment '计算源ID',
    compute_engine_name			string comment '计算源名称',
    compute_engine_type			string comment '计算源类型,OPEN_FLINK/FLINK/VVP',
    data_source_id          bigint comment '数据源ID',
		data_source_name 	    	string comment '数据源名称',
    data_source_type	    	string comment '数据源类型,MAX_COMPUTE/MYSQL/SQL_SERVER/HIVE/ONE_SERVICE/POSTGRE_SQL/FTP/EMR_HIVE/ORACLE/HDFS/DRDS/ANALYTICDB/MONGODB/FLINK/ANALYTICDB_FOR_PG/HOLOGRES/HBASE_1_1_X等',
    src_table_name          string comment '来源表名称',
    connector               string comment 'connector',
    gmt_create              string comment '创建时间',
    gmt_modified            string comment '修改时间'
) comment '实时元表元数据'
partitioned by (ds string comment '分区字段,yyyymmdd')
stored as orc
;

dim_dataphin_stream_column

create table if not exists dim_dataphin_stream_column 
(
    tenant_id               bigint comment '租户id',
    project_id              bigint comment '项目id',
    project_name            string comment '项目名称',
    table_name              string comment '元表名称',
    column_name							string comment '列名称',
    column_type							string comment '列数据类型',
    column_comment					string comment '列注释或分区键注释',				
    column_seq							bigint comment '列顺序',
    raw_column_type					string comment '原始列数据类型',
    env                     string comment '环境,DEV/PROD',
    create_time             string comment '创建时间',
    modify_time             string comment '修改时间'
) comment '实时元表字段元数据'
partitioned by (ds string comment '分区字段,yyyymmdd')
stored as orc
;

通信表

data_share_finish

create table if not exists data_share_finish
(
    module_name         string comment '模块名称:data_share',
    finish_time         string comment '完成时间'
)comment '基础共享元数据通信表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

data_security_finish

create table if not exists data_security_finish
(
    module_name         string comment '模块名称:data_security',
    finish_time         string comment '完成时间'
)comment '数据安全模块元数据通信表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

data_service_finish

create table if not exists data_service_finish
(
    module_name         string comment '模块名称:data_service',
    finish_time         string comment '完成时间'
)comment '数据服务模块元数据通信表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

data_quality_finish

create table if not exists data_quality_finish
(
    module_name         string comment '模块名称:data_quality',
    finish_time         string comment '完成时间'
)comment '数据质量元数据加工模块通信表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;

data_standard_finish

create table if not exists data_standard_finish
(
    module_name         string comment '模块名称:data_standard',
    finish_time         string comment '完成时间'
)comment '数据标准元数据加工模块通信表'
partitioned by (ds string comment '分区字段,yyyymmdd') 
stored as orc;
  • 本页导读 (0)
文档反馈