检查表格的 Postgres, Db2 语句是否与数据质量有关。
主题区域 | 表名 | 描述 |
---|---|---|
数据质量规则 | dq_issues_for_asset_columns | 列的数据质量问题。 |
数据质量规则 | dq_issues_for_assets | 资产进行质量分析以确定总体数据质量时观察到的问题。 |
数据质量规则 | dq_支票 | 有关数据质量检查的信息。 |
数据质量规则 | dq_v4_dimensions | 有关规则的质量维度的信息,例如,存在重复项。 |
数据质量规则 | dq_rule_Definitions | 数据质量规则定义。 |
数据质量规则 | dq_rules_defs | 数据质量规则定义。 |
数据质量规则 | dq_rules | 数据质量规则信息。 |
数据质量规则 | dq_rule_bindings | 数据质量规则的规则绑定。 |
数据质量规则 | dq_rule_execution | 数据质量规则作业的调度时间。 |
dq_issues_for_asset_columns 表
此表具有以下列:
issue_id
-资产问题的标识。asset_id
-资产的标识。container_id
-项目的标识。column_name
-为其运行数据 qulaity 规则和分析的列名。check_id
-数据质量检查的标识。number_of_occurences
-为数据质量检查找到的出现次数。number_of_tested_records
-为数据质量检查找到的已测试记录数。percent_occurences
-发生次数的百分比。score
-运行检查后找到分数。status
-问题的当前状态。ignored
-用于标识当前问题参与数据质量问题的轮次的标志。
Postgres
CREATE TABLE 语句:
CREATE TABLE IF NOT EXISTS dq_issues_for_asset_columns (
issue_id character varying(36) COLLATE pg_catalog.default NOT NULL,
container_id character varying(36) COLLATE pg_catalog.default NOT NULL,
column_name character varying(256) COLLATE pg_catalog.default NOT NULL,
asset_id character varying(36) COLLATE pg_catalog.default NOT NULL,
check_id character varying(36) COLLATE pg_catalog.default NOT NULL,
number_of_occurrences bigint NOT NULL DEFAULT 0,
number_of_tested_records bigint NOT NULL DEFAULT 0,
percent_occurrences double precision,
score double precision,
status character varying(16) COLLATE pg_catalog.default NOT NULL,
ignored boolean NOT NULL,
tech_start timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
tech_end timestamp(6) without time zone NOT NULL DEFAULT to_timestamp('9999-12-30' :: text, 'YYYY-MM-DD' :: text),
ts_id timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT dq_issues_for_asset_columns_pkey PRIMARY KEY (issue_id, asset_id, container_id, column_name),
CONSTRAINT fk_dq_issues_for_asset_columns_container_data_asset_columns_6 FOREIGN KEY (container_id, asset_id, column_name) REFERENCES container_data_asset_columns (container_id, asset_id, name) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE,
CONSTRAINT fk_dq_issues_for_asset_columns_dq_checks_5 FOREIGN KEY (container_id, check_id) REFERENCES dq_checks (container_id, check_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE
)
Db2
CREATE TABLE 语句:
CREATE TABLE DQ_ISSUES_FOR_ASSET_COLUMNS (
ISSUE_ID VARCHAR(36 OCTETS) NOT NULL,
CONTAINER_ID VARCHAR(36 OCTETS) NOT NULL,
COLUMN_NAME VARCHAR(256 OCTETS) NOT NULL,
ASSET_ID VARCHAR(36 OCTETS) NOT NULL,
CHECK_ID VARCHAR(36 OCTETS) NOT NULL,
NUMBER_OF_OCCURRENCES BIGINT NOT NULL WITH DEFAULT 0,
NUMBER_OF_TESTED_RECORDS BIGINT NOT NULL WITH DEFAULT 0,
PERCENT_OCCURRENCES DOUBLE,
SCORE DOUBLE,
STATUS VARCHAR(16 OCTETS) NOT NULL,
IGNORED BOOLEAN NOT NULL,
TECH_START TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW BEGIN,
TECH_END TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW END,
TS_ID TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS TRANSACTION START ID,
PERIOD SYSTEM_TIME (TECH_START, TECH_END)
) IN USERSPACE1 ORGANIZE BY ROW;
ALTER TABLE 语句:
ALTER TABLE
DQ_ISSUES_FOR_ASSET_COLUMNS
ADD
PRIMARY KEY (
ISSUE_ID,
ASSET_ID,
CONTAINER_ID,
COLUMN_NAME
) ENFORCED;
ALTER TABLE
DQ_ISSUES_FOR_ASSET_COLUMNS
ADD
CONSTRAINT FK_DQ_ISSUES_FOR_ASSET_COLUMNS_CONTAINER_DATA_ASSET_COLUMNS_6 FOREIGN KEY (CONTAINER_ID, ASSET_ID, COLUMN_NAME) REFERENCES CONTAINER_DATA_ASSET_COLUMNS (CONTAINER_ID, ASSET_ID, NAME) ON DELETE CASCADE ON UPDATE NO ACTION ENFORCED ENABLE QUERY OPTIMIZATION;
ALTER TABLE
DQ_ISSUES_FOR_ASSET_COLUMNS
ADD
CONSTRAINT FK_DQ_ISSUES_FOR_ASSET_COLUMNS_DQ_CHECKS_5 FOREIGN KEY (CHECK_ID, CONTAINER_ID) REFERENCES DQ_CHECKS (CHECK_ID, CONTAINER_ID) ON DELETE CASCADE ON UPDATE NO ACTION ENFORCED ENABLE QUERY OPTIMIZATION;
dq_issues_for_assets
此表具有以下列:
issue_id
-资产问题的标识。container_id
-项目的标识。asset_id
-资产的标识。check_id
-数据质量检查的标识。number_of_occurences
-为数据质量检查找到的出现次数。number_of_tested_records
-为数据质量检查找到的已测试记录数。percent_occurences
-发生次数的百分比。score
-运行检查后找到分数。status
-问题的当前状态。ignored
-用于标识当前问题是否参与数据质量问题的标志。
Postgres
CREATE TABLE 语句:
CREATE TABLE IF NOT EXISTS dq_issues_for_assets (
issue_id character varying(36) COLLATE pg_catalog.default NOT NULL,
container_id character varying(36) COLLATE pg_catalog.default NOT NULL,
asset_id character varying(36) COLLATE pg_catalog.default NOT NULL,
check_id character varying(36) COLLATE pg_catalog.default NOT NULL,
number_of_occurrences bigint NOT NULL DEFAULT 0,
number_of_tested_records bigint NOT NULL DEFAULT 0,
percent_occurrences double precision,
score double precision,
status character varying(16) COLLATE pg_catalog.default NOT NULL,
ignored boolean NOT NULL,
tech_start timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
tech_end timestamp(6) without time zone NOT NULL DEFAULT to_timestamp('9999-12-30' :: text, 'YYYY-MM-DD' :: text),
ts_id timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT dq_issues_for_assets_pkey PRIMARY KEY (issue_id, asset_id, container_id),
CONSTRAINT fk_dq_issues_for_assets_container_data_assets_4 FOREIGN KEY (container_id, asset_id) REFERENCES container_data_assets (container_id, asset_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE,
CONSTRAINT fk_dq_issues_for_assets_dq_checks_3 FOREIGN KEY (container_id, check_id) REFERENCES dq_checks (container_id, check_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE
)
Db2
CREATE TABLE 语句:
CREATE TABLE DQ_ISSUES_FOR_ASSETS (
ISSUE_ID VARCHAR(36 OCTETS) NOT NULL,
CONTAINER_ID VARCHAR(36 OCTETS) NOT NULL,
ASSET_ID VARCHAR(36 OCTETS) NOT NULL,
CHECK_ID VARCHAR(36 OCTETS) NOT NULL,
NUMBER_OF_OCCURRENCES BIGINT NOT NULL WITH DEFAULT 0,
NUMBER_OF_TESTED_RECORDS BIGINT NOT NULL WITH DEFAULT 0,
PERCENT_OCCURRENCES DOUBLE,
SCORE DOUBLE,
STATUS VARCHAR(16 OCTETS) NOT NULL,
IGNORED BOOLEAN NOT NULL,
TECH_START TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW BEGIN,
TECH_END TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW END,
TS_ID TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS TRANSACTION START ID,
PERIOD SYSTEM_TIME (TECH_START, TECH_END)
) IN USERSPACE1 ORGANIZE BY ROW;
ALTER TABLE 语句:
ALTER TABLE
DQ_ISSUES_FOR_ASSETS
ADD
PRIMARY KEY (ISSUE_ID, ASSET_ID, CONTAINER_ID) ENFORCED;
ALTER TABLE
DQ_ISSUES_FOR_ASSETS
ADD
CONSTRAINT FK_DQ_ISSUES_FOR_ASSETS_CONTAINER_DATA_ASSETS_4 FOREIGN KEY (CONTAINER_ID, ASSET_ID) REFERENCES CONTAINER_DATA_ASSETS (CONTAINER_ID, ASSET_ID) ON DELETE CASCADE ON UPDATE NO ACTION ENFORCED ENABLE QUERY OPTIMIZATION;
ALTER TABLE
DQ_ISSUES_FOR_ASSETS
ADD
CONSTRAINT FK_DQ_ISSUES_FOR_ASSETS_DQ_CHECKS_3 FOREIGN KEY (CHECK_ID, CONTAINER_ID) REFERENCES DQ_CHECKS (CHECK_ID, CONTAINER_ID) ON DELETE CASCADE ON UPDATE NO ACTION ENFORCED ENABLE QUERY OPTIMIZATION;
dq_支票表
此表具有以下列:
check_id
-数据质量检查的标识。container_id
-项目的标识。dq_check_type
-数据质量检查的类型 (可以是profilling
或data_rule
)。dq_check_name
-数据质量检查的名称。dq_dimension_id
-数据质量维度的标识。created_by
-创建此数据质量检查的用户。created_on
-数据质量检查的创建时间。
Postgres
CREATE TABLE 语句:
CREATE TABLE IF NOT EXISTS dq_checks (
check_id character varying(36) COLLATE pg_catalog.default NOT NULL,
container_id character varying(36) COLLATE pg_catalog.default NOT NULL,
dq_check_type character varying(256) COLLATE pg_catalog.default NOT NULL,
dq_check_name character varying(256) COLLATE pg_catalog.default NOT NULL,
dq_dimension_id character varying(36) COLLATE pg_catalog.default NOT NULL,
created_by character varying(256) COLLATE pg_catalog.default NOT NULL,
created_on timestamp(6) without time zone NOT NULL,
tech_start timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
tech_end timestamp(6) without time zone NOT NULL DEFAULT to_timestamp('9999-12-30' :: text, 'YYYY-MM-DD' :: text),
ts_id timestamp(6) without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT dq_checks_pkey PRIMARY KEY (check_id, container_id),
CONSTRAINT fk_dq_checks_containers_1 FOREIGN KEY (container_id) REFERENCES containers (container_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE,
CONSTRAINT fk_dq_checks_dq_v4_dimensions_2 FOREIGN KEY (dq_dimension_id) REFERENCES dq_v4_dimensions (dimension_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE
)
Db2
CREATE TABLE 语句:
CREATE TABLE DQ_CHECKS (
CHECK_ID VARCHAR(36 OCTETS) NOT NULL ,
CONTAINER_ID VARCHAR(36 OCTETS) NOT NULL ,
DQ_CHECK_TYPE VARCHAR(256 OCTETS) NOT NULL ,
DQ_CHECK_NAME VARCHAR(256 OCTETS) NOT NULL ,
DQ_DIMENSION_ID VARCHAR(36 OCTETS) NOT NULL ,
CREATED_BY VARCHAR(256 OCTETS) NOT NULL ,
CREATED_ON TIMESTAMP(12) NOT NULL ,
TECH_START TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW BEGIN ,
TECH_END TIMESTAMP(12) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS ROW END ,
TS_ID TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS TRANSACTION START ID ,
PERIOD SYSTEM_TIME ( TECH_START , TECH_END ) )
IN USERSPACE1
ORGANIZE BY ROW;
ALTER TABLE 语句:
ALTER TABLE DQ_CHECKS
ADD PRIMARY KEY
( CHECK_ID ,
CONTAINER_ID )
ENFORCED;
ALTER TABLE DQ_CHECKS
ADD CONSTRAINT FK_DQ_CHECKS_CONTAINERS_1 FOREIGN KEY
( CONTAINER_ID )
REFERENCES CONTAINERS
( CONTAINER_ID )
ON DELETE CASCADE
ON UPDATE NO ACTION
ENFORCED
ENABLE QUERY OPTIMIZATION;
ALTER TABLE DQ_CHECKS
ADD CONSTRAINT FK_DQ_CHECKS_DQ_V4_DIMENSIONS_2 FOREIGN KEY
( DQ_DIMENSION_ID )
REFERENCES DQ_V4_DIMENSIONS
( DIMENSION_ID )
ON DELETE CASCADE
ON UPDATE NO ACTION
ENFORCED
ENABLE QUERY OPTIMIZATION;
dq_v4_dimensions 表
此表包含有关规则的质量维度的信息。
此表具有以下列:
dimension_id
-数据质量维度的标识。name
-数据质量维度的名称。description
-数据质量维度的描述。
Postgres
CREATE TABLE 语句:
create table dq_v4_dimensions(dimension_id varchar(128) not null,
container_id varchar(36) not null,
name varchar(256) not null,
description varchar(256) not null,
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(dimension_id,
container_id))
ALTER TABLE 语句:
alter table dq_v4_dimensions add constraint fk_dq_v4_dimensions_containers_1 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
ALTER TABLE 语句:
ALTER TABLE IF EXISTS dq_v4_dimensions
OWNER to postgres;
Db2
CREATE TABLE 语句:
create table dq_v4_dimensions(dimension_id varchar(128) not null,
container_id varchar(36) not null,
name varchar(256) not null,
description varchar(256) not null,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(dimension_id,
container_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table dq_v4_dimensions add constraint fk_dq_v4_dimensions_containers_1 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
dq_rule_definition 表
此表包含数据质量规则的实际元数据。
此表具有以下列:
rule_definition_id
-数据质量规则定义的标识。container_id
-目录或项目的标识。expression
-数据质量规则定义的表达式。dq_dimension_id
-数据质量维度的标识。name
-数据质量定义的名称。
Postgres
CREATE TABLE 语句:
create table dq_rule_definitions(rule_definition_id varchar(128) not null,
container_id varchar(36) not null,
expression text not null,
dq_dimension_id varchar(128),
name varchar(256) not null,
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(rule_definition_id))
ALTER TABLE 语句:
alter table dq_rule_definitions add constraint fk_dq_rule_definitions_containers_2 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
alter table dq_rule_definitions add constraint fk_dq_rule_definitions_dq_v4_dimensions_3 foreign key (dq_dimension_id,
container_id) references dq_v4_dimensions(dimension_id,
container_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table dq_rule_definitions(rule_definition_id varchar(128) not null,
container_id varchar(36) not null,
expression clob not null,
dq_dimension_id varchar(128),
name varchar(256) not null,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(rule_definition_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table dq_rule_definitions add constraint fk_dq_rule_definitions_containers_2 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
alter table dq_rule_definitions add constraint fk_dq_rule_definitions_dq_v4_dimensions_3 foreign key (dq_dimension_id,
container_id) references dq_v4_dimensions(dimension_id,
container_id) on
delete
cascade on
update
no action
dq_rules_defs 表
此表包含规则与定义之间的绑定的详细信息,因为可以进行多个绑定。
此表具有以下列:
rule_id
-数据质量规则的标识。rule_definition_id
-规则定义的标识。disambiguator
-消岐器编号。
Postgres
CREATE TABLE 语句:
create table dq_rules_defs(rule_id varchar(128) not null,
rule_definition_id varchar(128) not null,
disambiguator integer,
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(rule_id,
rule_definition_id))
ALTER TABLE 语句:
alter table dq_rules_defs add constraint fk_dq_rules_defs_dq_rules_1 foreign key (rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
alter table dq_rules_defs add constraint fk_dq_rules_defs_dq_rule_definitions_2 foreign key (rule_definition_id) references dq_rule_definitions(rule_definition_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table dq_rules_defs(rule_id varchar(128) not null,
rule_definition_id varchar(128) not null,
disambiguator integer,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(rule_id,
rule_definition_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table dq_rules_defs add constraint fk_dq_rules_defs_dq_rules_1 foreign key (rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
alter table dq_rules_defs add constraint fk_dq_rules_defs_dq_rule_definitions_2 foreign key (rule_definition_id) references dq_rule_definitions(rule_definition_id) on
delete
cascade on
update
no action
dq_rules 表
此表包含有关数据质量规则的信息。
此表具有以下列:
rule_id
-数据质量规则的标识。container_id
-目录或项目的标识。dq_dimension_id
-数据质量规则维度的标识。name
-数据质量规则的名称。output_asset_id
-输出资产的标识。output_asset_container_id
-输出目录或项目的标识。
Postgres
CREATE TABLE 语句:
create table dq_rules(rule_id varchar(128) not null,
container_id varchar(36) not null,
dq_dimension_id varchar(128),
name varchar(256) not null,
output_asset_id varchar(128),
output_asset_container_id varchar(36),
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(rule_id))
ALTER TABLE 语句:
alter table dq_rules add constraint fk_dq_rules_dq_v4_dimensions_5 foreign key (dq_dimension_id,
container_id) references dq_v4_dimensions(dimension_id,
container_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table dq_rules(rule_id varchar(128) not null,
container_id varchar(36) not null,
dq_dimension_id varchar(128),
name varchar(256) not null,
output_asset_id varchar(128),
output_asset_container_id varchar(36),
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(rule_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table dq_rules add constraint fk_dq_rules_dq_v4_dimensions_5 foreign key (dq_dimension_id,
container_id) references dq_v4_dimensions(dimension_id,
container_id) on
delete
cascade on
update
no action
dq_rule_bindings 表
此表包含有关数据质量规则绑定的信息。
此表具有以下列:
rule_id
-数据质量规则的标识。rule_definition_id
-规则定义的标识。variable_name
-绑定到数据质量规则的列的变量的标识。column_name
-列的名称。container_id
-目录或项目的标识。asset_id
-资产的标识。
Postgres
CREATE TABLE 语句:
create table dq_rule_bindings(rule_id varchar(128) not null,
variable_name varchar(256) not null,
column_name varchar(256) not null,
container_id varchar(36) not null,
asset_id varchar(128) not null,
rule_definition_id varchar(128) default 'na' not null,
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(rule_id,
rule_definition_id,
variable_name,
column_name))
ALTER TABLE 语句:
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_dq_rules_6 foreign key (rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_container_data_asset_columns_7 foreign key (container_id,
asset_id,
column_name) references container_data_asset_columns(container_id,
asset_id,
name) on
delete
cascade on
update
no action
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_dq_rules_defs_3 foreign key (rule_id,
rule_definition_id) references dq_rules_defs(rule_id,
rule_definition_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table dq_rule_bindings(rule_id varchar(128) not null,
variable_name varchar(256) not null,
column_name varchar(256) not null,
container_id varchar(36) not null,
asset_id varchar(128) not null,
rule_definition_id varchar(128) default 'na' not null,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(rule_id,
rule_definition_id,
variable_name,
column_name),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_dq_rules_6 foreign key (rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_container_data_asset_columns_7 foreign key (container_id,
asset_id,
column_name) references container_data_asset_columns(container_id,
asset_id,
name) on
delete
cascade on
update
no action
alter table dq_rule_bindings add constraint fk_dq_rule_bindings_dq_rules_defs_3 foreign key (rule_id,
rule_definition_id) references dq_rules_defs(rule_id,
rule_definition_id) on
delete
cascade on
update
no action
dq_rule_execution 表
此表包含有关数据质量规则的规则作业的信息。
此表具有以下列:
dq_rule_id
-数据质量规则的标识。execution_id
-数据质量规则作业的作业标识。start_time
-数据质量规则作业的作业开始时间。end_time
-数据质量规则作业的作业结束时间。nb_tested_rows
-数据质量规则作业的已测试行数。nb_passing_rows
-数据质量规则作业的传递行数。nb_failing_rows
-数据质量规则作业的失败行数。percent_passing_rows
-传递数据质量规则作业行的百分比。percent_failing_rows
-数据质量规则作业的失败行所占的百分比。sampling_used
-指定是否将采样用于数据质量规则。sample_size
-数据质量规则的采样大小。sample_type
-数据质量规则的采样类型。flow_job_id
- DataStage 流程任务的标识符。flow_job_run_id
- DataStage flow 作业运行的标识符。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".dq_rule_execution(
dq_rule_id varchar(128) NOT NULL,
execution_id varchar(256) NOT NULL,
start_time timestamp(6) NOT NULL,
end_time timestamp(6) NOT NULL,
nb_tested_rows bigint NOT NULL,
nb_passing_rows bigint NOT NULL,
nb_failing_rows bigint NOT NULL,
percent_passing_rows float NOT NULL,
percent_failing_rows float NOT NULL,
sampling_used decimal(1) CHECK (
sampling_used in (0, 1)
) NOT NULL,
sample_size bigint,
sample_type varchar(256),
flow_job_id varchar(128),
flow_job_run_id varchar(128),
tech_start TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) NOT NULL DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(dq_rule_id, execution_id)
)
ALTER TABLE 语句:
alter table dq_rule_execution add constraint fk_dq_rule_execution_dq_rules_8 foreign key (dq_rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".dq_rule_execution(
dq_rule_id varchar(128) NOT NULL,
execution_id varchar(256) NOT NULL,
start_time timestamp(6) NOT NULL,
end_time timestamp(6) NOT NULL,
nb_tested_rows bigint NOT NULL,
nb_passing_rows bigint NOT NULL,
nb_failing_rows bigint NOT NULL,
percent_passing_rows float NOT NULL,
percent_failing_rows float NOT NULL,
sampling_used decimal(1) CHECK (
sampling_used in (0, 1)
) NOT NULL,
sample_size bigint,
sample_type varchar(256),
flow_job_id varchar(128),
flow_job_run_id varchar(128),
tech_start TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) NOT NULL DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(dq_rule_id, execution_id)
)
ALTER TABLE 语句:
alter table dq_rule_execution add constraint fk_dq_rule_execution_dq_rules_8 foreign key (dq_rule_id) references dq_rules(rule_id) on
delete
cascade on
update
no action
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".dq_rule_execution(
dq_rule_id varchar(128) NOT NULL,
execution_id varchar(256) NOT NULL,
start_time DATETIME2 NOT NULL,
end_time DATETIME2 NOT NULL,
nb_tested_rows bigint NOT NULL,
nb_passing_rows bigint NOT NULL,
nb_failing_rows bigint NOT NULL,
percent_passing_rows float NOT NULL,
percent_failing_rows float NOT NULL,
sampling_used decimal(1) CHECK (
sampling_used in (0, 1)
) NOT NULL,
sample_size bigint,
sample_type varchar(256),
flow_job_id varchar(128),
flow_job_run_id varchar(128),
tech_start DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL,
tech_end DATETIME2 GENERATED ALWAYS AS ROW END NOT NULL,
ts_id DATETIME2 DEFAULT CURRENT_TIMESTAMP NOT NULL,
CONSTRAINT PK_dq_rule_execution_globalschema PRIMARY KEY(dq_rule_id, execution_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_dq_rule_execution
)
)
了解更多信息
父主题: 报告表