add workflow 荟聚API,dev
This commit is contained in:
parent
f126d400e9
commit
f10bc0a237
|
@ -0,0 +1,82 @@
|
|||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
delete from p10_sa.S98_S_customer_events_add_user
|
||||
;
|
||||
insert into p10_sa.S98_S_customer_events_add_user
|
||||
( id_str
|
||||
, date
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, attr6
|
||||
, attr5
|
||||
, external_id
|
||||
, attr7
|
||||
, source
|
||||
, attr2
|
||||
, attr1
|
||||
, last_updated
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt )
|
||||
select
|
||||
id_str
|
||||
, date
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, attr6
|
||||
, attr5
|
||||
, external_id
|
||||
, attr7
|
||||
, source
|
||||
, attr2
|
||||
, attr1
|
||||
, last_updated
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt
|
||||
from p00_tal.S98_S_customer_events_add_user
|
||||
;
|
||||
delete from p12_sfull.S98_S_customer_events_add_user
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_customer_events_add_user
|
||||
( id_str
|
||||
, date
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, attr6
|
||||
, attr5
|
||||
, external_id
|
||||
, attr7
|
||||
, source
|
||||
, attr2
|
||||
, attr1
|
||||
, last_updated
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt )
|
||||
select
|
||||
id_str
|
||||
, date
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, attr6
|
||||
, attr5
|
||||
, external_id
|
||||
, attr7
|
||||
, source
|
||||
, attr2
|
||||
, attr1
|
||||
, last_updated
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt
|
||||
from p10_sa.S98_S_customer_events_add_user
|
||||
;
|
||||
\q
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
CREATE FOREIGN TABLE if not exists p00_tal.S98_S_customer_events_add_user (
|
||||
id_str TEXT
|
||||
, date TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, attr6 TEXT
|
||||
, attr5 TEXT
|
||||
, external_id TEXT
|
||||
, attr7 TEXT
|
||||
, source TEXT
|
||||
, attr2 TEXT
|
||||
, attr1 TEXT
|
||||
, last_updated TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
)
|
||||
|
||||
|
||||
SERVER pgsql_server_S98_S OPTIONS(schema_name 'data_api', table_name 'customer_events_add_user' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
create table if not exists p10_sa.S98_S_customer_events_add_user (
|
||||
id_str TEXT
|
||||
, date TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, attr6 TEXT
|
||||
, attr5 TEXT
|
||||
, external_id TEXT
|
||||
, attr7 TEXT
|
||||
, source TEXT
|
||||
, attr2 TEXT
|
||||
, attr1 TEXT
|
||||
, last_updated TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.date IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.target_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.attr6 IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.attr5 IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.external_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.attr7 IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.source IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.attr2 IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.attr1 IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.last_updated IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.customer_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.event IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_add_user.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p10_sa.S98_S_customer_events_add_user IS '';
|
||||
|
||||
|
||||
|
||||
create table if not exists p12_sfull.S98_S_customer_events_add_user (
|
||||
id_str TEXT
|
||||
, date TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, attr6 TEXT
|
||||
, attr5 TEXT
|
||||
, external_id TEXT
|
||||
, attr7 TEXT
|
||||
, source TEXT
|
||||
, attr2 TEXT
|
||||
, attr1 TEXT
|
||||
, last_updated TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.date IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.target_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.attr6 IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.attr5 IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.external_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.attr7 IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.source IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.attr2 IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.attr1 IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.last_updated IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.customer_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.event IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_add_user.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p12_sfull.S98_S_customer_events_add_user IS '';
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
delete from p10_sa.S98_S_customer_events_c_minipro_page_view
|
||||
;
|
||||
insert into p10_sa.S98_S_customer_events_c_minipro_page_view
|
||||
( id_str
|
||||
, c_source_content
|
||||
, date
|
||||
, target_name
|
||||
, c_source
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip_city
|
||||
, ip
|
||||
, external_id
|
||||
, ip_country
|
||||
, platform
|
||||
, url
|
||||
, last_updated
|
||||
, c_url
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, ip_province
|
||||
, c_name
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt )
|
||||
select
|
||||
id_str
|
||||
, c_source_content
|
||||
, date
|
||||
, target_name
|
||||
, c_source
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip_city
|
||||
, ip
|
||||
, external_id
|
||||
, ip_country
|
||||
, platform
|
||||
, url
|
||||
, last_updated
|
||||
, c_url
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, ip_province
|
||||
, c_name
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt
|
||||
from p00_tal.S98_S_customer_events_c_minipro_page_view
|
||||
;
|
||||
delete from p12_sfull.S98_S_customer_events_c_minipro_page_view
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_customer_events_c_minipro_page_view
|
||||
( id_str
|
||||
, c_source_content
|
||||
, date
|
||||
, target_name
|
||||
, c_source
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip_city
|
||||
, ip
|
||||
, external_id
|
||||
, ip_country
|
||||
, platform
|
||||
, url
|
||||
, last_updated
|
||||
, c_url
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, ip_province
|
||||
, c_name
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt )
|
||||
select
|
||||
id_str
|
||||
, c_source_content
|
||||
, date
|
||||
, target_name
|
||||
, c_source
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip_city
|
||||
, ip
|
||||
, external_id
|
||||
, ip_country
|
||||
, platform
|
||||
, url
|
||||
, last_updated
|
||||
, c_url
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, ip_province
|
||||
, c_name
|
||||
, id
|
||||
, event
|
||||
, etl_tx_dt
|
||||
from p10_sa.S98_S_customer_events_c_minipro_page_view
|
||||
;
|
||||
\q
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
CREATE FOREIGN TABLE if not exists p00_tal.S98_S_customer_events_c_minipro_page_view (
|
||||
id_str TEXT
|
||||
, c_source_content TEXT
|
||||
, date TEXT
|
||||
, target_name TEXT
|
||||
, c_source TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip_city TEXT
|
||||
, ip TEXT
|
||||
, external_id TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, url TEXT
|
||||
, last_updated TEXT
|
||||
, c_url TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, ip_province TEXT
|
||||
, c_name TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
)
|
||||
|
||||
|
||||
SERVER pgsql_server_S98_S OPTIONS(schema_name 'data_api', table_name 'customer_events_c_minipro_page_view' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
create table if not exists p10_sa.S98_S_customer_events_c_minipro_page_view (
|
||||
id_str TEXT
|
||||
, c_source_content TEXT
|
||||
, date TEXT
|
||||
, target_name TEXT
|
||||
, c_source TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip_city TEXT
|
||||
, ip TEXT
|
||||
, external_id TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, url TEXT
|
||||
, last_updated TEXT
|
||||
, c_url TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, ip_province TEXT
|
||||
, c_name TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.c_source_content IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.date IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.target_name IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.c_source IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.os IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.target_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.ip_city IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.ip IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.external_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.ip_country IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.platform IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.url IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.last_updated IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.c_url IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.os_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.browser IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.browser_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.customer_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.ip_province IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.c_name IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.event IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_c_minipro_page_view.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p10_sa.S98_S_customer_events_c_minipro_page_view IS '';
|
||||
|
||||
|
||||
|
||||
create table if not exists p12_sfull.S98_S_customer_events_c_minipro_page_view (
|
||||
id_str TEXT
|
||||
, c_source_content TEXT
|
||||
, date TEXT
|
||||
, target_name TEXT
|
||||
, c_source TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip_city TEXT
|
||||
, ip TEXT
|
||||
, external_id TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, url TEXT
|
||||
, last_updated TEXT
|
||||
, c_url TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, ip_province TEXT
|
||||
, c_name TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.c_source_content IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.date IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.target_name IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.c_source IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.os IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.target_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.ip_city IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.ip IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.external_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.ip_country IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.platform IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.url IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.last_updated IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.c_url IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.os_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.browser IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.browser_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.customer_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.ip_province IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.c_name IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.event IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_c_minipro_page_view.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p12_sfull.S98_S_customer_events_c_minipro_page_view IS '';
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
delete from p10_sa.S98_S_customer_events_lastupdated
|
||||
;
|
||||
insert into p10_sa.S98_S_customer_events_lastupdated
|
||||
( date
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, tag
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, ip_county
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt )
|
||||
select
|
||||
date
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, tag
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, ip_county
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt
|
||||
from p00_tal.S98_S_customer_events_lastupdated
|
||||
;
|
||||
delete from p12_sfull.S98_S_customer_events_lastupdated
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_customer_events_lastupdated
|
||||
( date
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, tag
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, ip_county
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt )
|
||||
select
|
||||
date
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, tag
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, ip_county
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt
|
||||
from p10_sa.S98_S_customer_events_lastupdated
|
||||
;
|
||||
\q
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
CREATE FOREIGN TABLE if not exists p00_tal.S98_S_customer_events_lastupdated (
|
||||
date TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, tag TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, ip_county TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
)
|
||||
|
||||
|
||||
SERVER pgsql_server_S98_S OPTIONS(schema_name 'data_api', table_name 'customer_events_lastupdated' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
|
||||
create table if not exists p10_sa.S98_S_customer_events_lastupdated (
|
||||
date TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, tag TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, ip_county TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.date IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.screen_width IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.target_name IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.ip_city IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.ip_country IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.platform IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.last_updated IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.page_type IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.os_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.browser IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.browser_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.customer_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.tag IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.event IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.os IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.target_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.ip IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.screen_height IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.external_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.ip_county IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.page_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.url IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.ip_province IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.device IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_lastupdated.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p10_sa.S98_S_customer_events_lastupdated IS '';
|
||||
|
||||
|
||||
|
||||
create table if not exists p12_sfull.S98_S_customer_events_lastupdated (
|
||||
date TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, tag TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, ip_county TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.date IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.screen_width IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.target_name IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.ip_city IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.ip_country IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.platform IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.last_updated IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.page_type IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.os_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.browser IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.browser_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.customer_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.tag IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.event IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.os IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.target_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.ip IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.screen_height IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.external_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.ip_county IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.page_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.url IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.ip_province IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.device IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_lastupdated.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p12_sfull.S98_S_customer_events_lastupdated IS '';
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
delete from p10_sa.S98_S_customer_events_open_content_page
|
||||
;
|
||||
insert into p10_sa.S98_S_customer_events_open_content_page
|
||||
( date
|
||||
, short_id
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt )
|
||||
select
|
||||
date
|
||||
, short_id
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt
|
||||
from p00_tal.S98_S_customer_events_open_content_page
|
||||
;
|
||||
delete from p12_sfull.S98_S_customer_events_open_content_page
|
||||
;
|
||||
;
|
||||
insert into p12_sfull.S98_S_customer_events_open_content_page
|
||||
( date
|
||||
, short_id
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt )
|
||||
select
|
||||
date
|
||||
, short_id
|
||||
, screen_width
|
||||
, target_name
|
||||
, ip_city
|
||||
, ip_country
|
||||
, platform
|
||||
, last_updated
|
||||
, page_type
|
||||
, os_version
|
||||
, browser
|
||||
, browser_version
|
||||
, customer_id
|
||||
, id
|
||||
, event
|
||||
, id_str
|
||||
, os
|
||||
, target_id
|
||||
, customer_id_str
|
||||
, ip
|
||||
, screen_height
|
||||
, external_id
|
||||
, page_id
|
||||
, url
|
||||
, ip_province
|
||||
, device
|
||||
, etl_tx_dt
|
||||
from p10_sa.S98_S_customer_events_open_content_page
|
||||
;
|
||||
\q
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
CREATE FOREIGN TABLE if not exists p00_tal.S98_S_customer_events_open_content_page (
|
||||
date TEXT
|
||||
, short_id TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
)
|
||||
|
||||
|
||||
SERVER pgsql_server_S98_S OPTIONS(schema_name 'data_api', table_name 'customer_events_open_content_page' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
|
||||
create table if not exists p10_sa.S98_S_customer_events_open_content_page (
|
||||
date TEXT
|
||||
, short_id TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.date IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.short_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.screen_width IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.target_name IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.ip_city IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.ip_country IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.platform IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.last_updated IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.page_type IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.os_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.browser IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.browser_version IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.customer_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.event IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.os IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.target_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.ip IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.screen_height IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.external_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.page_id IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.url IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.ip_province IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.device IS '';
|
||||
COMMENT ON COLUMN p10_sa.S98_S_customer_events_open_content_page.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p10_sa.S98_S_customer_events_open_content_page IS '';
|
||||
|
||||
|
||||
|
||||
create table if not exists p12_sfull.S98_S_customer_events_open_content_page (
|
||||
date TEXT
|
||||
, short_id TEXT
|
||||
, screen_width TEXT
|
||||
, target_name TEXT
|
||||
, ip_city TEXT
|
||||
, ip_country TEXT
|
||||
, platform TEXT
|
||||
, last_updated TEXT
|
||||
, page_type TEXT
|
||||
, os_version TEXT
|
||||
, browser TEXT
|
||||
, browser_version TEXT
|
||||
, customer_id TEXT
|
||||
, id TEXT
|
||||
, event TEXT
|
||||
, id_str TEXT
|
||||
, os TEXT
|
||||
, target_id TEXT
|
||||
, customer_id_str TEXT
|
||||
, ip TEXT
|
||||
, screen_height TEXT
|
||||
, external_id TEXT
|
||||
, page_id TEXT
|
||||
, url TEXT
|
||||
, ip_province TEXT
|
||||
, device TEXT
|
||||
, etl_tx_dt TIMESTAMP
|
||||
) ;
|
||||
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.date IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.short_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.screen_width IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.target_name IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.ip_city IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.ip_country IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.platform IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.last_updated IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.page_type IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.os_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.browser IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.browser_version IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.customer_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.event IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.os IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.target_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.customer_id_str IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.ip IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.screen_height IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.external_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.page_id IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.url IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.ip_province IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.device IS '';
|
||||
COMMENT ON COLUMN p12_sfull.S98_S_customer_events_open_content_page.etl_tx_dt IS '';
|
||||
|
||||
COMMENT ON TABLE p12_sfull.S98_S_customer_events_open_content_page IS '';
|
||||
|
Loading…
Reference in New Issue