元数据导入和扩充项报告表
检查 Postgres Db2 语句以获取与元数据导入和扩充项相关的表。
| 主题区域 | 表名 | 描述 |
|---|---|---|
| 元数据导入和扩充项 | 元数据导入 | Metadata import 信息。 |
| 元数据导入和扩充项 | 元数据导入执行 | 元数据导入作业的调度时间。 |
| 元数据导入和扩充项 | metadata_扩充项 | 元数据扩充项信息。 |
| 元数据导入和扩充项 | 职位资产 | 本表包含有关工作资产的信息。 |
| 元数据导入和扩充项 | 工作运行资产 | 该表包含有关任务执行情况的信息。 |
metadata_import 表
此表包含有关元数据导入的信息。
此表具有以下列:
metadata_import_id-元数据导入的标识。container_id-项目的标识。metadata_import_name-元数据导入的名称。target_container_id-目标项目的标识。connection_id-在其中创建导入的连接标识。
Postgres
CREATE TABLE 语句:
create table metadata_imports(metadata_import_id varchar(128) not null,
container_id varchar(128) not null,
metadata_import_name varchar(256) not null,
target_container_id varchar(128),
connection_id varchar(128),
metadata_enrichment_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(container_id,
metadata_import_id))
ALTER TABLE 语句:
alter table metadata_imports add constraint fk_metadata_imports_container_assets_2 foreign key (container_id,
metadata_import_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table metadata_imports(metadata_import_id varchar(128) not null,
container_id varchar(128) not null,
metadata_import_name varchar(256) not null,
target_container_id varchar(128),
connection_id varchar(128),
metadata_enrichment_id varchar(128),
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,
metadata_import_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table metadata_imports add constraint fk_metadata_imports_container_assets_2 foreign key (container_id,
metadata_import_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
metadata_import_型执行表
此表包含有关 "元数据导入" 作业的信息。
此表具有以下列:
metadata_import_id-元数据导入的标识。container_id-项目的标识。job_run_id-作业运行的标识。invoked_by-启动它的人员的标识。is_scheduled_run-元数据导入作业的作业的调度时间。start_time-元数据导入作业的作业开始时间。end_time-元数据导入作业的作业结束时间。state-元数据导入作业的状态。count_discovered-发现的资产数。count_discovered_with_children-已发现的具有子代的资产数。count_submitted-发现的资产数。count_succeeded-成功导入的资产数。count_succedded_with_children-成功导入的具有子代的资产数。count_new_assets-新资产的数量。count_updated_assets-已更新资产的数量。count_deleted_assets-已删除的资产数。
Postgres
CREATE TABLE 语句:
create table metadata_import_executions(metadata_import_id varchar(128) not null,
container_id varchar(36) not null,
job_run_id varchar(128) not null,
invoked_by varchar(128) not null,
is_scheduled_run boolean not null,
start_time timestamp(6) not null,
end_time timestamp(6),
state varchar(32) not null,
count_discovered bigint default 0 not null,
count_discovered_with_children bigint default 0 not null,
count_submitted bigint default 0 not null,
count_succeeded bigint default 0 not null,
count_succedded_with_children bigint default 0 not null,
count_new_assets bigint default 0 not null,
count_updated_assets bigint default 0 not null,
count_deleted_assets 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,
metadata_import_id,
job_run_id))
ALTER TABLE 语句:
alter table metadata_import_executions add constraint fk_metadata_import_executions_metadata_imports_3 foreign key (container_id,
metadata_import_id) references metadata_imports(container_id,
metadata_import_id) on
delete
cascade on
update
no action
alter table metadata_import_executions add constraint fk_metadata_import_executions_container_assets_4 foreign key (container_id,
job_run_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table metadata_import_executions(metadata_import_id varchar(128) not null,
container_id varchar(36) not null,
job_run_id varchar(128) not null,
invoked_by varchar(128) not null,
is_scheduled_run boolean not null,
start_time timestamp(12) not null,
end_time timestamp(12),
state varchar(32) not null,
count_discovered bigint default 0 not null,
count_discovered_with_children bigint default 0 not null,
count_submitted bigint default 0 not null,
count_succeeded bigint default 0 not null,
count_succedded_with_children bigint default 0 not null,
count_new_assets bigint default 0 not null,
count_updated_assets bigint default 0 not null,
count_deleted_assets bigint default 0 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,
metadata_import_id,
job_run_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table metadata_import_executions add constraint fk_metadata_import_executions_metadata_imports_3 foreign key (container_id,
metadata_import_id) references metadata_imports(container_id,
metadata_import_id) on
delete
cascade on
update
no action
alter table metadata_import_executions add constraint fk_metadata_import_executions_container_assets_4 foreign key (container_id,
job_run_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
metadata_扩充项表
此表包含有关元数据扩充项的信息。
此表具有以下列:
metadata_enrichment_id-元数据扩充的标识。container_id-项目的标识。metadata_enrichment_name-元数据扩充项的名称。
Postgres
CREATE TABLE 语句:
create table metadata_enrichments(metadata_enrichment_id varchar(128) not null,
container_id varchar(36) not null,
metadata_enrichment_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,
metadata_enrichment_id))
ALTER TABLE 语句:
alter table metadata_enrichments add constraint fk_metadata_enrichments_container_assets_1 foreign key (container_id,
metadata_enrichment_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table metadata_enrichments(metadata_enrichment_id varchar(128) not null,
container_id varchar(36) not null,
metadata_enrichment_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,
metadata_enrichment_id),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table metadata_enrichments add constraint fk_metadata_enrichments_container_assets_1 foreign key (container_id,
metadata_enrichment_id) references container_assets(container_id,
asset_id) on
delete
cascade on
update
no action
工作资产表
本表包含有关工作资产的信息。
此表具有以下列:
container_id- 资产所在容器(目录或项目)的标识符。asset_id- 数据资产的标识符。version- 表示作业资产的版本。job_name- 工作资产的名称。asset_ref_type- 指定创建任务的资产类型。asset_ref- 实际资产的标识符。schedule- 定义任务运行的时间(如 0 0 * * *)。schedule_info- 有关计划表的附加元数据,如开始时间、结束时间。last_run_status_timestamp- 任务最近一次执行的时间戳。future_scheduled_runs- 作业的预定执行时间列表或数组。enable_notifications- 布尔标志,用于确定是否需要启用更改通知。project_name- 项目名称。schedule_id- 调度本身的唯一标识符,允许多个作业引用相同的调度配置。schedule_creator_id- 创建计划表的用户的标识符。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_asset(
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
asset_ref_type varchar(256),
asset_ref varchar(36),
schedule varchar(36),
schedule_info jsonb,
last_run_status_timestamp timestamp(6),
future_scheduled_runs jsonb,
enable_notifications decimal(1) CHECK (
enable_notifications in (0, 1)
) NOT NULL,
project_name varchar(256) NOT NULL,
schedule_id varchar(36),
schedule_creator_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(container_id, asset_id)
)
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_asset(
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
asset_ref_type varchar(256),
asset_ref varchar(36),
schedule varchar(36),
schedule_info clob,
last_run_status_timestamp timestamp(12),
future_scheduled_runs clob,
enable_notifications decimal(1) CHECK (
enable_notifications in (0, 1)
) NOT NULL,
project_name varchar(256) NOT NULL,
schedule_id varchar(36),
schedule_creator_id varchar(128),
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)
)
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_asset(
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
asset_ref_type varchar(256),
asset_ref varchar(36),
schedule varchar(36),
schedule_info varchar(MAX),
last_run_status_timestamp DATETIME2,
future_scheduled_runs varchar(MAX),
enable_notifications decimal(1) CHECK (
enable_notifications in (0, 1)
) NOT NULL,
project_name varchar(256) NOT NULL,
schedule_id varchar(36),
schedule_creator_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_job_asset_globalschema PRIMARY KEY(container_id, asset_id),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
) WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = "globalschema".hist_job_asset
)
)
工作运行资产表
该表包含有关任务执行情况的信息。
此表具有以下列:
container_id- 资产所在容器(目录或项目)的标识符。asset_id- 数据资产的标识符。version- 表示作业资产的版本。job_name- 工作资产的名称。job_ref- 链接到工作的参考标识。job_type- 指定创建作业运行的资产类型。state- 任务运行资产的状态( E.g Running、Completed、FAILED)。isScheduledRun- 表示运行是由计划触发还是手动触发。project_name- 项目名称。last_state_change_timestamp- 最近一次状态更新的时间戳。duration- 工作运行完成所需的时间。
Postgres
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_run_asset(
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
job_ref varchar(36) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
job_type varchar(256) NOT NULL,
state varchar(32),
isScheduledRun decimal(1) CHECK (
isScheduledRun in (0, 1)
),
project_name varchar(256) NOT NULL,
last_state_change_timestamp timestamp(6) NOT NULL,
duration integer 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, job_ref)
)
Db2
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_run_asset(
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
job_ref varchar(36) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
job_type varchar(256) NOT NULL,
state varchar(32),
isScheduledRun decimal(1) CHECK (
isScheduledRun in (0, 1)
),
project_name varchar(256) NOT NULL,
last_state_change_timestamp timestamp(12) NOT NULL,
duration integer 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, job_ref),
PERIOD SYSTEM_TIME (tech_start, tech_end)
)
MS SQL Server
CREATE TABLE 语句:
CREATE TABLE "globalschema".job_run_asset (
container_id varchar(36) NOT NULL,
asset_id varchar(128) NOT NULL,
job_ref varchar(36) NOT NULL,
version integer NOT NULL,
job_name varchar(256) NOT NULL,
job_type varchar(256) NOT NULL,
state varchar(32),
isScheduledRun decimal(1) CHECK (isScheduledRun in (0, 1)),
project_name varchar(256) NOT NULL,
last_state_change_timestamp DATETIME2 NOT NULL,
duration integer 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_job_run_asset_globalschema
PRIMARY KEY (container_id, asset_id, job_ref),
PERIOD FOR SYSTEM_TIME (tech_start, tech_end)
WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = "globalschema".hist_job_run_asset))
);