检查 Postgres Db2 语句中与工作空间相关的表。
主题区域 | 表名 | 描述 |
---|---|---|
工作空间 | 容器 | 创建的目录和项目。 |
工作空间 | 项目 | 项目及其成员。 |
工作空间 | 容器资产 | 目录或项目中定义的资产。 |
工作空间 | 容器数据资产 | 在目录或项目中定义的数据资产。 |
工作空间 | container_data_asset_columns | 数据资产中的列。 |
工作空间 | data_asset_column_tags | 与列关联的标记。 |
工作空间 | asset_collaborators | 资产的所有成员的列表。 |
工作空间 | 容器成员 | 目录或项目的所有成员的列表。 |
工作空间 | data_asset_column_class_distribution | 具有置信度的列的建议数据类。 |
工作空间 | data_asset_column_prop_values | 定制属性列值。 |
工作空间 | data_source_definitions | 有关数据源定义的详细信息。 |
工作空间 | connection_dsd_assignments | 有关分配给数据源定义的连接的详细信息。 |
容器表
此表包含有关已创建的目录和项目的信息。
此表具有以下列:
container_id
-目录或项目的标识。container_type
-指定工作空间的类型是目录还是项目。name
-目录或项目的名称。description
-工作空间的描述。is_governed
-指定是否管理目录。 仅适用于目录。created_by
-创建工作空间的用户的标识。created_on
-创建工作空间时的时间戳记。
Postgres
CREATE TABLE 语句:
create table containers(container_id varchar(36) not null,
container_type varchar(16) not null,
name varchar(256) not null,
description clob,
is_governed boolean not null,
created_by varchar(128) 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,
primary key(container_id),
period SYSTEM_TIME (tech_start,
tech_end) )
Db2
CREATE TABLE 语句:
CREATE TABLE containers(container_id varchar(36) NOT NULL,
container_type varchar(16) NOT NULL,
name varchar(256) NOT NULL,
description clob,
is_governed boolean NOT NULL,
created_by varchar(128) 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,
PRIMARY KEY(container_id),
PERIOD SYSTEM_TIME (tech_start,
tech_end) )
项目表
此表包含有关项目及其成员的信息。
此表具有以下列:
project_id
-项目的标识。project_name
-项目的名称。enforce_members
-指定是将项目成员的作用域限定为创建者的帐户还是 SAML。
Postgres
CREATE TABLE 语句:
CREATE TABLE projects(project_id varchar(36) NOT NULL,
project_name varchar(256) NOT NULL,
enforce_members boolean 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(project_id));
ALTER TABLE 语句:
alter table projects add constraint fk_projects_containers_11 foreign key (project_id) references containers(container_id) on
delete
cascade on
update
no action ;
Db2
CREATE TABLE 语句:
create table projects(project_id varchar(36) not null,
project_name varchar(256) not null,
enforce_members 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,
primary key(project_id),
period SYSTEM_TIME (tech_start,
tech_end) )
ALTER TABLE 语句:
alter table projects add constraint fk_projects_containers_11 foreign key (project_id) references containers(container_id) on
delete
cascade on
update
no action
container_assets 表
此表包含有关在目录或项目中定义的资产的信息。
此表具有以下列:
asset_id
-资产的标识。container_id
-目录或项目的标识。container_type
-指定工作空间的类型是目录还是项目。name
-资产的名称。description
-资产的描述。owner
-拥有资产的用户的标识。asset_type
-资产的类型。created_on
-创建资产时的时间戳记。modified_on
-上次修改资产时的时间戳记。modified_by
-上次修改资产的用户的标识。rov
-资产的可视性规则。 有关更多信息,请参阅 资产主元数据文档 (或卡)。asset_state
-资产的当前状态,无论是可用还是已删除。source
-有关资产源的信息 (通过提供源系统)。source_additional_info
-提供与资产源相关的其他信息。resource_key
-用于去重的资产的唯一标识。asset_category
-资产类别,用户资产或系统资产。rating
-资产的平均社会评级。total_ratings
-资产的评级总数。format
-与资产关联的数据的格式,例如 CSV ,八位元流或 PDF。origin_country
-数据源自的国家或地区,格式为 ISO 3166 国家或地区代码的投诉。size
-本地资产的大小。parent_folder_id
--该资产所在父文件夹的资产 ID(如果有)。identity_key
--分配给连接资产的数据源定义的标识符。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_assets(
container_id varchar(36) NOT NULL,
container_type varchar(16) NOT NULL,
asset_id varchar(128) NOT NULL,
name varchar(256) NOT NULL,
description text,
asset_type varchar(256) NOT NULL,
owner varchar(128) NOT NULL,
source text,
source_additional_info text,
resource_key varchar(256),
asset_category varchar(64),
rov integer NOT NULL,
asset_state varchar(32) NOT NULL,
format varchar(128),
asset_size varchar(36) NOT NULL,
created_on timestamp(6) NOT NULL,
modified_by varchar(128),
modified_on timestamp(6),
origin_country varchar(128) NOT NULL,
rating float,
total_ratings integer,
parent_folder_id varchar(36),
identity_key varchar(256),
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(container_id, asset_id)
)
ALTER TABLE 语句:
alter table container_assets add constraint fk_container_assets_containers_2 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_assets(
container_id varchar(36) NOT NULL,
container_type varchar(16) NOT NULL,
asset_id varchar(128) NOT NULL,
name varchar(256) NOT NULL,
description clob,
asset_type varchar(256) NOT NULL,
owner varchar(128) NOT NULL,
source clob,
source_additional_info clob,
resource_key varchar(256),
asset_category varchar(64),
rov integer NOT NULL,
asset_state varchar(32) NOT NULL,
format varchar(128),
asset_size varchar(36) NOT NULL,
created_on timestamp(12) NOT NULL,
modified_by varchar(128),
modified_on timestamp(12),
origin_country varchar(128) NOT NULL,
rating float,
total_ratings integer,
parent_folder_id varchar(36),
identity_key varchar(256),
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(container_id, asset_id),
PERIOD SYSTEM_TIME (tech_start, tech_end)
)
ALTER TABLE 语句:
alter table container_assets add constraint fk_container_assets_containers_2 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_assets(
container_id varchar(36) NOT NULL,
container_type varchar(16) NOT NULL,
asset_id varchar(128) NOT NULL,
name varchar(256) NOT NULL,
description varchar(MAX),
asset_type varchar(256) NOT NULL,
owner varchar(128) NOT NULL,
source varchar(MAX),
source_additional_info varchar(MAX),
resource_key varchar(256),
asset_category varchar(64),
rov integer NOT NULL,
asset_state varchar(32) NOT NULL,
format varchar(128),
asset_size varchar(36) NOT NULL,
created_on DATETIME2 NOT NULL,
modified_by varchar(128),
modified_on DATETIME2,
origin_country varchar(128) NOT NULL,
rating float,
total_ratings integer,
parent_folder_id varchar(36),
identity_key varchar(256),
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_container_assets_globalschema PRIMARY KEY(container_id, asset_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_container_assets
)
)
container_data_assets 表
此表包含有关目录或项目中定义的数据资产的信息。
此表具有以下列:
asset_id
-资产的标识。container_id
-目录或项目的标识。quality_score
-通过概要分析确定的资产质量得分。attachments
-与数据资产关联的其他信息。 例如,连接信息 (如果存在某些已连接的资产)。metadata_import_id
-元数据导入的标识。metadata_enrichment_id
-元数据扩充的标识。reviewed_on
-数据上已复审的资产。connection_path
-相对连接路径。published_to_container_id
-目标项目的标识。source_container_id
-源工作空间的标识。source_asset_id
-源资产的标识。select_statement
-用于获取 SQL 查询类型数据资产的 SQL 语句。number_of_records
- 数据集中的记录总数。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_data_assets(
asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,
attachments text,
quality_score float,
metadata_enrichment_id varchar(128),
metadata_import_id varchar(128),
reviewed_on timestamp(6),
connection_path varchar(256),
published_to_container_id varchar(36),
source_container_id varchar(36),
source_asset_id varchar(128),
num_columns bigint DEFAULT 0 NOT NULL,
num_rows_analysed bigint DEFAULT 0 NOT NULL,
last_profile_time timestamp(6),
table_schema varchar(256),
table_type varchar(16),
mdi_job_run_id varchar(128),
mdi_job_action varchar(16),
select_statement text,
number_of_records bigint DEFAULT 0 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(container_id, asset_id)
)
ALTER TABLE 语句:
alter table catalog_data_assets add constraint fk_catalog_data_assets_container_assets_12 foreign key (container_id,
asset_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_data_assets(
asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,
attachments text,
quality_score float,
metadata_enrichment_id varchar(128),
metadata_import_id varchar(128),
reviewed_on timestamp(6),
connection_path varchar(256),
published_to_container_id varchar(36),
source_container_id varchar(36),
source_asset_id varchar(128),
num_columns bigint DEFAULT 0 NOT NULL,
num_rows_analysed bigint DEFAULT 0 NOT NULL,
last_profile_time timestamp(6),
table_schema varchar(256),
table_type varchar(16),
mdi_job_run_id varchar(128),
mdi_job_action varchar(16),
select_statement text,
number_of_records bigint DEFAULT 0 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(container_id, asset_id)
)
ALTER TABLE 语句:
alter table catalog_data_assets add constraint fk_catalog_data_assets_container_assets_12 foreign key (container_id,
asset_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".container_data_assets(
asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,
attachments varchar(MAX),
quality_score float,
metadata_enrichment_id varchar(128),
metadata_import_id varchar(128),
reviewed_on DATETIME2,
connection_path varchar(256),
published_to_container_id varchar(36),
source_container_id varchar(36),
source_asset_id varchar(128),
num_columns bigint DEFAULT 0 NOT NULL,
num_rows_analysed bigint DEFAULT 0 NOT NULL,
last_profile_time DATETIME2,
table_schema varchar(256),
table_type varchar(16),
mdi_job_run_id varchar(128),
mdi_job_action varchar(16),
select_statement varchar(MAX),
number_of_records bigint DEFAULT 0 NOT NULL,
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_container_data_assets_globalschema PRIMARY KEY(container_id, asset_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_container_data_assets
)
)
container_data_asset_columns 表
此表包含有关数据资产中各个列的信息。
此表具有以下列:
asset_id
-资产的标识。container_id
-目录或项目的标识。name
-列的名称。column_id
-与列关联的标识 (当该标识可用时)。quality_score
-由概要分析确定的列的质量得分。description
-列的描述。reviewed_on
-数据上已复审的资产。is_nullable
-标识列是否可空。mean
-列中值的平均值。native_data_type
-列的本机数据类型。inferred_data_type
-列的推断数据类型。number_of_records
- 数据集中的记录总数。
Postgres
CREATE TABLE 语句:
CREATE TABLE container_data_asset_columns(
asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,
column_id varchar(128),
name varchar(256) NOT NULL,
description text,
quality_score float,
reviewed_on timestamp(6),
source_data_type varchar(32),
distinct_count bigint DEFAULT 0 NOT NULL,
unique_count bigint DEFAULT 0 NOT NULL,
null_count bigint DEFAULT 0 NOT NULL,
empty_count bigint DEFAULT 0 NOT NULL,
min_length bigint DEFAULT 0 NOT NULL,
max_length bigint DEFAULT 0 NOT NULL,
mean_length bigint DEFAULT 0 NOT NULL,
std_deviation float DEFAULT 0 NOT NULL,
is_nullable decimal(1) CHECK (
is_nullable in (0, 1)
) DEFAULT 1 NOT NULL,
mdi_job_run_id varchar(128),
mean float,
native_data_type varchar(256),
inferred_data_type 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(container_id, asset_id, name)
)
ALTER TABLE 语句:
alter table catalog_data_asset_columns add constraint fk_catalog_data_asset_columns_catalog_data_assets_13 foreign key (container_id,
asset_id) references catalog_data_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
CREATE TABLE container_data_asset_columns(
asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,
column_id varchar(128),
name varchar(256) NOT NULL,
description text,
quality_score float,
reviewed_on timestamp(6),
source_data_type varchar(32),
distinct_count bigint DEFAULT 0 NOT NULL,
unique_count bigint DEFAULT 0 NOT NULL,
null_count bigint DEFAULT 0 NOT NULL,
empty_count bigint DEFAULT 0 NOT NULL,
min_length bigint DEFAULT 0 NOT NULL,
max_length bigint DEFAULT 0 NOT NULL,
mean_length bigint DEFAULT 0 NOT NULL,
std_deviation float DEFAULT 0 NOT NULL,
is_nullable decimal(1) CHECK (
is_nullable in (0, 1)
) DEFAULT 1 NOT NULL,
mdi_job_run_id varchar(128),
mean float,
native_data_type varchar(256),
inferred_data_type 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(container_id, asset_id, name)
)
ALTER TABLE 语句:
alter table catalog_data_asset_columns add constraint fk_catalog_data_asset_columns_catalog_data_assets_13 foreign key (container_id,
asset_id) references catalog_data_assets(container_id,
asset_id) on
delete
cascade on
update
no action
data_asset_column_tags 表
此表包含有关与列关联的标记的信息。
此表具有以下列:
column_name
-列的名称。asset_id
-数据资产的标识。container_id
-目录或项目的标识。tagname
-关联标记的名称。
Postgres
CREATE TABLE 语句:
create table data_asset_column_tags(asset_id varchar(128) not null,
container_id varchar(36) not null,
tag_name varchar(256) not null,
column_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(container_id,
asset_id,
column_name,
tag_name));
ALTER TABLE 语句:
alter table data_asset_column_tags add constraint fk_data_asset_column_tags_tags_5 foreign key (tag_name) references tags(tag_name) on
delete
cascade on
update
no action
alter table data_asset_column_tags add constraint fk_data_asset_column_tags_catalog_data_asset_columns_15 foreign key (container_id,
asset_id,
column_name) references catalog_data_asset_columns(container_id,
asset_id,
name) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table data_asset_column_tags(asset_id varchar(128) not null,
container_id varchar(36) not null,
tag_name varchar(256) not null,
column_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(container_id,
asset_id,
column_name,
tag_name),
period SYSTEM_TIME (tech_start,
tech_end) )
ALTER TABLE 语句:
alter table data_asset_column_tags add constraint fk_data_asset_column_tags_tags_5 foreign key (tag_name) references tags(tag_name) on
delete
cascade on
update
no action
alter table data_asset_column_tags add constraint fk_data_asset_column_tags_catalog_data_asset_columns_15 foreign key (container_id,
asset_id,
column_name) references catalog_data_asset_columns(container_id,
asset_id,
name) on
delete
cascade on
update
no action
asset_collaborators 表
此表包含资产的所有成员的列表。
此表具有以下列:
asset_id
-资产的标识。container_id
-目录的标识。user_id
-合作者的标识。role
-分配给用户的角色,例如: 所有者,编辑者或查看者。is_group
- 此列定义资产协作者是组还是用户。
Postgres
CREATE TABLE 语句:
CREATE TABLE asset_collaborators(asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,user_id varchar(128) NOT NULL,
role varchar(128) DEFAULT 'na' NOT NULL,is_group decimal(1) CHECK
(is_group in (0,1)) DEFAULT 0 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(container_id,asset_id,user_id,role))
ALTER TABLE 语句:
alter table asset_collaborators add constraint fk_asset_collaborators_container_assets_6 foreign key (container_id,
asset_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
CREATE TABLE asset_collaborators(asset_id varchar(128) NOT NULL,
container_id varchar(36) NOT NULL,user_id varchar(128) NOT NULL,
role varchar(128) DEFAULT 'na' NOT NULL,is_group decimal(1)
CHECK (is_group in (0,1)) DEFAULT 0 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(container_id,asset_id,user_id,role))
ALTER TABLE 语句:
alter table asset_collaborators add constraint fk_asset_collaborators_container_assets_6 foreign key (container_id,
asset_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
container_members 表
此表包含目录或项目的所有成员的列表。
此表具有以下列:
container_id
-目录或项目的标识。member_id
-成员或组的标识。is_group
-指定成员是否为组。 如果值为 true ,那么 member_id 列的值是组的标识。role
-分配给用户或用户组的角色,例如 "管理员" , "编辑者" 或 "查看者"。
Postgres
CREATE TABLE 语句:
create table container_members(container_id varchar(36) not null,
is_group boolean not null,
member_id varchar(64) not null,
role varchar(32) 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(container_id,
member_id));
ALTER TABLE 语句:
alter table container_members add constraint fk_container_members_containers_1 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table container_members(container_id varchar(36) not null,
is_group boolean not null,
member_id varchar(64) not null,
role varchar(32) 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(container_id,
member_id),
period SYSTEM_TIME (tech_start,
tech_end) )
ALTER TABLE 语句:
alter table container_members add constraint fk_container_members_containers_1 foreign key (container_id) references containers(container_id) on
delete
cascade on
update
no action
data_asset_column_class_distribution 表
此表具有以下列:
issue_id
-资产问题的标识。asset_id
-资产标识。container_id
-项目的标识。column_name
-要对其运行数据质量规则和分析的列的名称。data_class_artifact_id
-数据类工件的标识。
Postgres
CREATE TABLE 语句:
CREATE TABLE IF NOT EXISTS data_asset_column_class_distribution (
asset_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,
data_class_artifact_id character varying(128) COLLATE pg_catalog.default NOT NULL,
confidence double precision,
count bigint NOT NULL DEFAULT 0,
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 data_asset_column_class_distribution_pkey PRIMARY KEY (
asset_id,
container_id,
column_name,
data_class_artifact_id
),
CONSTRAINT fk_data_asset_column_class_distribution_container_data_asset_co 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_data_asset_column_class_distribution_governance_artifacts_8 FOREIGN KEY (data_class_artifact_id) REFERENCES governance_artifacts (artifact_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE
)
Db2
CREATE TABLE 语句:
CREATE TABLE DATA_ASSET_COLUMN_CLASS_DISTRIBUTION (
ASSET_ID VARCHAR(36 OCTETS) NOT NULL,
CONTAINER_ID VARCHAR(36 OCTETS) NOT NULL,
COLUMN_NAME VARCHAR(256 OCTETS) NOT NULL,
DATA_CLASS_ARTIFACT_ID VARCHAR(128 OCTETS) NOT NULL,
CONFIDENCE DOUBLE,
COUNT BIGINT NOT NULL WITH DEFAULT 0,
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
DATA_ASSET_COLUMN_CLASS_DISTRIBUTION
ADD
PRIMARY KEY (
ASSET_ID,
CONTAINER_ID,
COLUMN_NAME,
DATA_CLASS_ARTIFACT_ID
) ENFORCED;
ALTER TABLE
DATA_ASSET_COLUMN_CLASS_DISTRIBUTION
ADD
VERSIONING USE HISTORY TABLE HIST_DATA_ASSET_COLUMN_CLASS_DISTRIBUTION;
ALTER TABLE
DATA_ASSET_COLUMN_CLASS_DISTRIBUTION
ADD
CONSTRAINT FK_DATA_ASSET_COLUMN_CLASS_DISTRIBUTION_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 ENFORCED ENABLE QUERY OPTIMIZATION;
ALTER TABLE
DATA_ASSET_COLUMN_CLASS_DISTRIBUTION
ADD
CONSTRAINT FK_DATA_ASSET_COLUMN_CLASS_DISTRIBUTION_GOVERNANCE_ARTIFACTS_8 FOREIGN KEY (DATA_CLASS_ARTIFACT_ID) REFERENCES GOVERNANCE_ARTIFACTS (ARTIFACT_ID) ON DELETE CASCADE ON UPDATE NO ACTION ENFORCED ENABLE QUERY OPTIMIZATION;
data_asset_column_prop_values 表
此表具有以下列:
column_name
-container_id
-指定目录/项目的标识。asset_id
-与定制属性关联的资产的标识。property_id
-定制属性的标识。property_group_id
-在其下方定义了属性的组的标识。value_id
-给定列属性的值标识。asset_type
-定制属性适用于的资产类型。property_text_value
-文本定制属性的值。property_num_value
-数字定制属性的值。property_date_value
-日期定制属性的值。property_value_type
-值的类型,即字符串,数字,日期,用户和组。
Postgres
CREATE TABLE 语句:
CREATE TABLE data_asset_column_prop_values(
column_name varchar(256) NOT NULL,
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
property_id varchar(256) NOT NULL,
property_group_id varchar(256) NOT NULL,
value_id varchar(256) NOT NULL,
asset_type varchar(256) NOT NULL,
property_text_value text,
property_num_value double precision,
property_date_value timestamp(6),
property_value_type varchar(16),
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(
column_name, container_id, asset_id,
property_id, property_group_id,
value_id, asset_type
)
)
Db2
CREATE TABLE 语句:
CREATE TABLE data_asset_column_prop_values(
column_name varchar(256) NOT NULL,
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
property_id varchar(256) NOT NULL,
property_group_id varchar(256) NOT NULL,
value_id varchar(256) NOT NULL,
asset_type varchar(256) NOT NULL,
property_text_value text,
property_num_value double precision,
property_date_value timestamp(6),
property_value_type varchar(16),
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(
column_name, container_id, asset_id,
property_id, property_group_id,
value_id, asset_type
)
)
ALTER TABLE 语句:
ALTER TABLE data_asset_column_prop_values ADD CONSTRAINT fk_data_asset_column_prop_values_container_data_asset_columns_1 FOREIGN KEY (column_name,
asset_id,
container_id) REFERENCES container_data_asset_columns(name,
asset_id,
container_id) ON
DELETE
CASCADE ON
UPDATE
NO ACTION
ALTER TABLE data_asset_column_prop_values ADD CONSTRAINT fk_data_asset_column_prop_values_asset_type_custom_properties_2 FOREIGN KEY (property_id,
property_group_id,
asset_type) REFERENCES asset_type_custom_properties(property_id,
property_group_id,
asset_type) ON
DELETE
CASCADE ON
UPDATE
NO ACTION
数据源定义表
本表包含数据源定义的详细信息。
此表具有以下列:
dsd_container_id
- DSD 资产所在容器(目录)的标识符。 这主要是平台资产目录。dsd_asset_id
- DSD 资产的标识符。dsd_asset_name
- DSD 资产的名称。data_source_type_id
- 底层数据源类型的类型标识符。data_source_type
- 底层数据源类型的名称。data_source_state
- 定义数据源状态。data_source_encoding
- 定义数据源使用的编码。data_source_protection_method
- 数据源保护方法,取决于底层连接类型。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".data_source_definitions(
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
dsd_asset_name varchar(128),
data_source_type_id varchar(36),
data_source_type varchar(128),
data_source_state varchar(16),
data_source_encoding varchar(16),
data_source_protection_method varchar(32),
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(dsd_container_id, dsd_asset_id)
)
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".data_source_definitions(
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
dsd_asset_name varchar(128),
data_source_type_id varchar(36),
data_source_type varchar(128),
data_source_state varchar(16),
data_source_encoding varchar(16),
data_source_protection_method varchar(32),
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_data_source_definitions_globalschema PRIMARY KEY(dsd_container_id, dsd_asset_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_data_source_definitions
)
)
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".data_source_definitions(
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
dsd_asset_name varchar(128),
data_source_type_id varchar(36),
data_source_type varchar(128),
data_source_state varchar(16),
data_source_encoding varchar(16),
data_source_protection_method varchar(32),
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_data_source_definitions_globalschema PRIMARY KEY(dsd_container_id, dsd_asset_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_data_source_definitions
)
)
connection_dsd_assignments 表
该表包含分配给数据源定义的连接的详细信息。
此表具有以下列:
container_id
- 连接资产所在容器的标识符。connection_id
- 连接资产的标识符。dsd_container_id
- 包含与此连接相关的 DSD 资产的容器/目录。dsd_asset_id
- DSD 资产的标识符。data_source_type_id
- 底层数据源类型的类型标识符。data_source_type
- 底层数据源类型的名称。dsd_asset_name
- DSD 资产的资产名称。dsd_connection_name
- 连接资产名称,是链接数据源的附加部分。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".connection_dsd_assignments(
container_id varchar(36) NOT NULL,
connection_id varchar(128) NOT NULL,
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
data_source_type_id varchar(36),
data_source_type varchar(128),
dsd_asset_name varchar(128),
dsd_connection_name 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(
container_id, connection_id, dsd_container_id,
dsd_asset_id
)
)
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".connection_dsd_assignments(
container_id varchar(36) NOT NULL,
connection_id varchar(128) NOT NULL,
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
data_source_type_id varchar(36),
data_source_type varchar(128),
dsd_asset_name varchar(128),
dsd_connection_name 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(
container_id, connection_id, dsd_container_id,
dsd_asset_id
)
)
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".connection_dsd_assignments(
container_id varchar(36) NOT NULL,
connection_id varchar(128) NOT NULL,
dsd_container_id varchar(36) NOT NULL,
dsd_asset_id varchar(128) NOT NULL,
data_source_type_id varchar(36),
data_source_type varchar(128),
dsd_asset_name varchar(128),
dsd_connection_name 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_connection_dsd_assignments_globalschema PRIMARY KEY(
container_id, connection_id, dsd_container_id,
dsd_asset_id
),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_connection_dsd_assignments
)
)
了解更多信息
父主题: 报告表