-- Create table
create table ETL_LOG
(
id VARCHAR2(32),
jobname VARCHAR2(100),
source VARCHAR2(100),
target VARCHAR2(100),
datadescription VARCHAR2(200),
datatotal NUMBER,
begintime DATE,
endtime DATE,
flag VARCHAR2(1)
);
-- Add comments to the table
comment on table ETL_LOG
is 'ETL日志表';
-- Add comments to the columns
comment on column ETL_LOG.id
is 'ID';
comment on column ETL_LOG.jobname
is 'JOB名称';
comment on column ETL_LOG.source
is '来源方';
comment on column ETL_LOG.target
is '目的方';
comment on column ETL_LOG.datadescription
is '数据内容描述';
comment on column ETL_LOG.datatotal
is '数据量';
comment on column ETL_LOG.begintime
is '开始时间';
comment on column ETL_LOG.endtime
is '结束时间';
comment on column ETL_LOG.flag
is '是否执行成功:0成功、1失败';
-- Create table
create table LOG_JOB
(
id_job INTEGER not null,
channel_id VARCHAR2(255),
jobname VARCHAR2(255),
status VARCHAR2(15),
lines_read INTEGER,
lines_written INTEGER,
lines_updated INTEGER,
lines_input INTEGER,
lines_output INTEGER,
lines_rejected INTEGER,
errors INTEGER,
startdate DATE,
enddate DATE,
logdate DATE,
depdate DATE,
replaydate DATE,
log_field CLOB
);
-- Create/Recreate primary, unique and foreign key constraints
alter table LOG_JOB
add constraint LOG_JOB_PK primary key (ID_JOB)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Create table
create table LOG_ENTRY
(
id_batch INTEGER,
channel_id VARCHAR2(255),
log_date DATE,
transname VARCHAR2(255),
stepname VARCHAR2(255),
lines_read INTEGER,
lines_written INTEGER,
lines_updated INTEGER,
lines_input INTEGER,
lines_output INTEGER,
lines_rejected INTEGER,
errors INTEGER,
result CHAR(1),
nr_result_rows INTEGER,
nr_result_files INTEGER
);
-- Create table
create table LOG_LOGGING_CHANNELS
(
id_batch INTEGER,
channel_id VARCHAR2(255),
log_date DATE,
logging_object_type VARCHAR2(255),
object_name VARCHAR2(255),
object_copy VARCHAR2(255),
repository_directory VARCHAR2(255),
filename VARCHAR2(255),
object_id VARCHAR2(255),
object_revision VARCHAR2(255),
parent_channel_id VARCHAR2(255),
root_channel_id VARCHAR2(255)
);
create table ETL_LOG
(
id VARCHAR2(32),
jobname VARCHAR2(100),
source VARCHAR2(100),
target VARCHAR2(100),
datadescription VARCHAR2(200),
datatotal NUMBER,
begintime DATE,
endtime DATE,
flag VARCHAR2(1)
);
-- Add comments to the table
comment on table ETL_LOG
is 'ETL日志表';
-- Add comments to the columns
comment on column ETL_LOG.id
is 'ID';
comment on column ETL_LOG.jobname
is 'JOB名称';
comment on column ETL_LOG.source
is '来源方';
comment on column ETL_LOG.target
is '目的方';
comment on column ETL_LOG.datadescription
is '数据内容描述';
comment on column ETL_LOG.datatotal
is '数据量';
comment on column ETL_LOG.begintime
is '开始时间';
comment on column ETL_LOG.endtime
is '结束时间';
comment on column ETL_LOG.flag
is '是否执行成功:0成功、1失败';
-- Create table
create table LOG_JOB
(
id_job INTEGER not null,
channel_id VARCHAR2(255),
jobname VARCHAR2(255),
status VARCHAR2(15),
lines_read INTEGER,
lines_written INTEGER,
lines_updated INTEGER,
lines_input INTEGER,
lines_output INTEGER,
lines_rejected INTEGER,
errors INTEGER,
startdate DATE,
enddate DATE,
logdate DATE,
depdate DATE,
replaydate DATE,
log_field CLOB
);
-- Create/Recreate primary, unique and foreign key constraints
alter table LOG_JOB
add constraint LOG_JOB_PK primary key (ID_JOB)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Create table
create table LOG_ENTRY
(
id_batch INTEGER,
channel_id VARCHAR2(255),
log_date DATE,
transname VARCHAR2(255),
stepname VARCHAR2(255),
lines_read INTEGER,
lines_written INTEGER,
lines_updated INTEGER,
lines_input INTEGER,
lines_output INTEGER,
lines_rejected INTEGER,
errors INTEGER,
result CHAR(1),
nr_result_rows INTEGER,
nr_result_files INTEGER
);
-- Create table
create table LOG_LOGGING_CHANNELS
(
id_batch INTEGER,
channel_id VARCHAR2(255),
log_date DATE,
logging_object_type VARCHAR2(255),
object_name VARCHAR2(255),
object_copy VARCHAR2(255),
repository_directory VARCHAR2(255),
filename VARCHAR2(255),
object_id VARCHAR2(255),
object_revision VARCHAR2(255),
parent_channel_id VARCHAR2(255),
root_channel_id VARCHAR2(255)
);