add workflow 泰克CRM,dev
This commit is contained in:
parent
9d657e5349
commit
63f980bb7d
|
@ -0,0 +1,218 @@
|
||||||
|
/*******Main Section**************************************************************************/
|
||||||
|
\set ON_ERROR_STOP on
|
||||||
|
\set AUTOCOMMIT on
|
||||||
|
\timing on
|
||||||
|
delete from p10_sa.S98_S_crm_opp
|
||||||
|
;
|
||||||
|
insert into p10_sa.S98_S_crm_opp
|
||||||
|
( tek_opportunitynumber
|
||||||
|
, name
|
||||||
|
, tek_tektronixapname
|
||||||
|
, estimatedclosedate
|
||||||
|
, parentaccountidname
|
||||||
|
, parentcontactidname
|
||||||
|
, tek_productidname
|
||||||
|
, tek_productfamilyidname
|
||||||
|
, transactioncurrencyidname
|
||||||
|
, tek_unitpricetotal_base
|
||||||
|
, tek_totaldiscountpercent
|
||||||
|
, totaldiscountamount_base
|
||||||
|
, estimatedvalue_base
|
||||||
|
, totalamount
|
||||||
|
, tek_salesfunnelstagename
|
||||||
|
, tek_funnelstagenumber
|
||||||
|
, statuscodename
|
||||||
|
, statecodename
|
||||||
|
, tek_regionidname
|
||||||
|
, tek_accountmanageridname
|
||||||
|
, tek_oppterritoryidname
|
||||||
|
, tek_opp_includeinforecastname
|
||||||
|
, tek_isriskname
|
||||||
|
, tek_opportunityage
|
||||||
|
, createdon
|
||||||
|
, createdbyname
|
||||||
|
, tek_piplinelastupdatedon
|
||||||
|
, tek_laststatusdate
|
||||||
|
, tek_channelidname
|
||||||
|
, tek_purchasemethodname
|
||||||
|
, campaignidname
|
||||||
|
, tek_webvisitormedium
|
||||||
|
, tek_webvisitorsource
|
||||||
|
, tek_customerapplication
|
||||||
|
, tek_vertical_segmentname
|
||||||
|
, tek_competitivestatusname
|
||||||
|
, tek_importantopportunityname
|
||||||
|
, tek_applicationidname
|
||||||
|
, tek_industryidname
|
||||||
|
, tek_taglist
|
||||||
|
, discountamount
|
||||||
|
, tek_terr_areaidname
|
||||||
|
, tek_terr_branchidname
|
||||||
|
, tek_extension
|
||||||
|
, tek_companynamelegal
|
||||||
|
, accountnumber
|
||||||
|
, tek_marketing_program_type_idname
|
||||||
|
, tek_leadnumber
|
||||||
|
, tek_contactnumber
|
||||||
|
, etl_tx_dt )
|
||||||
|
select
|
||||||
|
tek_opportunitynumber
|
||||||
|
, name
|
||||||
|
, tek_tektronixapname
|
||||||
|
, estimatedclosedate
|
||||||
|
, parentaccountidname
|
||||||
|
, parentcontactidname
|
||||||
|
, tek_productidname
|
||||||
|
, tek_productfamilyidname
|
||||||
|
, transactioncurrencyidname
|
||||||
|
, tek_unitpricetotal_base
|
||||||
|
, tek_totaldiscountpercent
|
||||||
|
, totaldiscountamount_base
|
||||||
|
, estimatedvalue_base
|
||||||
|
, totalamount
|
||||||
|
, tek_salesfunnelstagename
|
||||||
|
, tek_funnelstagenumber
|
||||||
|
, statuscodename
|
||||||
|
, statecodename
|
||||||
|
, tek_regionidname
|
||||||
|
, tek_accountmanageridname
|
||||||
|
, tek_oppterritoryidname
|
||||||
|
, tek_opp_includeinforecastname
|
||||||
|
, tek_isriskname
|
||||||
|
, tek_opportunityage
|
||||||
|
, createdon
|
||||||
|
, createdbyname
|
||||||
|
, tek_piplinelastupdatedon
|
||||||
|
, tek_laststatusdate
|
||||||
|
, tek_channelidname
|
||||||
|
, tek_purchasemethodname
|
||||||
|
, campaignidname
|
||||||
|
, tek_webvisitormedium
|
||||||
|
, tek_webvisitorsource
|
||||||
|
, tek_customerapplication
|
||||||
|
, tek_vertical_segmentname
|
||||||
|
, tek_competitivestatusname
|
||||||
|
, tek_importantopportunityname
|
||||||
|
, tek_applicationidname
|
||||||
|
, tek_industryidname
|
||||||
|
, tek_taglist
|
||||||
|
, discountamount
|
||||||
|
, tek_terr_areaidname
|
||||||
|
, tek_terr_branchidname
|
||||||
|
, tek_extension
|
||||||
|
, tek_companynamelegal
|
||||||
|
, accountnumber
|
||||||
|
, tek_marketing_program_type_idname
|
||||||
|
, tek_leadnumber
|
||||||
|
, tek_contactnumber
|
||||||
|
, etl_tx_dt
|
||||||
|
from p00_tal.S98_S_crm_opp
|
||||||
|
;
|
||||||
|
delete from p12_sfull.S98_S_crm_opp
|
||||||
|
where (tek_opportunitynumber) in (select tek_opportunitynumber from p10_sa.S98_S_crm_opp) ;
|
||||||
|
;
|
||||||
|
insert into p12_sfull.S98_S_crm_opp
|
||||||
|
( tek_opportunitynumber
|
||||||
|
, name
|
||||||
|
, tek_tektronixapname
|
||||||
|
, estimatedclosedate
|
||||||
|
, parentaccountidname
|
||||||
|
, parentcontactidname
|
||||||
|
, tek_productidname
|
||||||
|
, tek_productfamilyidname
|
||||||
|
, transactioncurrencyidname
|
||||||
|
, tek_unitpricetotal_base
|
||||||
|
, tek_totaldiscountpercent
|
||||||
|
, totaldiscountamount_base
|
||||||
|
, estimatedvalue_base
|
||||||
|
, totalamount
|
||||||
|
, tek_salesfunnelstagename
|
||||||
|
, tek_funnelstagenumber
|
||||||
|
, statuscodename
|
||||||
|
, statecodename
|
||||||
|
, tek_regionidname
|
||||||
|
, tek_accountmanageridname
|
||||||
|
, tek_oppterritoryidname
|
||||||
|
, tek_opp_includeinforecastname
|
||||||
|
, tek_isriskname
|
||||||
|
, tek_opportunityage
|
||||||
|
, createdon
|
||||||
|
, createdbyname
|
||||||
|
, tek_piplinelastupdatedon
|
||||||
|
, tek_laststatusdate
|
||||||
|
, tek_channelidname
|
||||||
|
, tek_purchasemethodname
|
||||||
|
, campaignidname
|
||||||
|
, tek_webvisitormedium
|
||||||
|
, tek_webvisitorsource
|
||||||
|
, tek_customerapplication
|
||||||
|
, tek_vertical_segmentname
|
||||||
|
, tek_competitivestatusname
|
||||||
|
, tek_importantopportunityname
|
||||||
|
, tek_applicationidname
|
||||||
|
, tek_industryidname
|
||||||
|
, tek_taglist
|
||||||
|
, discountamount
|
||||||
|
, tek_terr_areaidname
|
||||||
|
, tek_terr_branchidname
|
||||||
|
, tek_extension
|
||||||
|
, tek_companynamelegal
|
||||||
|
, accountnumber
|
||||||
|
, tek_marketing_program_type_idname
|
||||||
|
, tek_leadnumber
|
||||||
|
, tek_contactnumber
|
||||||
|
, etl_tx_dt )
|
||||||
|
select
|
||||||
|
tek_opportunitynumber
|
||||||
|
, name
|
||||||
|
, tek_tektronixapname
|
||||||
|
, estimatedclosedate
|
||||||
|
, parentaccountidname
|
||||||
|
, parentcontactidname
|
||||||
|
, tek_productidname
|
||||||
|
, tek_productfamilyidname
|
||||||
|
, transactioncurrencyidname
|
||||||
|
, tek_unitpricetotal_base
|
||||||
|
, tek_totaldiscountpercent
|
||||||
|
, totaldiscountamount_base
|
||||||
|
, estimatedvalue_base
|
||||||
|
, totalamount
|
||||||
|
, tek_salesfunnelstagename
|
||||||
|
, tek_funnelstagenumber
|
||||||
|
, statuscodename
|
||||||
|
, statecodename
|
||||||
|
, tek_regionidname
|
||||||
|
, tek_accountmanageridname
|
||||||
|
, tek_oppterritoryidname
|
||||||
|
, tek_opp_includeinforecastname
|
||||||
|
, tek_isriskname
|
||||||
|
, tek_opportunityage
|
||||||
|
, createdon
|
||||||
|
, createdbyname
|
||||||
|
, tek_piplinelastupdatedon
|
||||||
|
, tek_laststatusdate
|
||||||
|
, tek_channelidname
|
||||||
|
, tek_purchasemethodname
|
||||||
|
, campaignidname
|
||||||
|
, tek_webvisitormedium
|
||||||
|
, tek_webvisitorsource
|
||||||
|
, tek_customerapplication
|
||||||
|
, tek_vertical_segmentname
|
||||||
|
, tek_competitivestatusname
|
||||||
|
, tek_importantopportunityname
|
||||||
|
, tek_applicationidname
|
||||||
|
, tek_industryidname
|
||||||
|
, tek_taglist
|
||||||
|
, discountamount
|
||||||
|
, tek_terr_areaidname
|
||||||
|
, tek_terr_branchidname
|
||||||
|
, tek_extension
|
||||||
|
, tek_companynamelegal
|
||||||
|
, accountnumber
|
||||||
|
, tek_marketing_program_type_idname
|
||||||
|
, tek_leadnumber
|
||||||
|
, tek_contactnumber
|
||||||
|
, etl_tx_dt
|
||||||
|
from p10_sa.S98_S_crm_opp
|
||||||
|
;
|
||||||
|
\q
|
|
@ -0,0 +1,61 @@
|
||||||
|
|
||||||
|
CREATE FOREIGN TABLE if not exists p00_tal.S98_S_crm_opp (
|
||||||
|
tek_opportunitynumber TEXT
|
||||||
|
, name TEXT
|
||||||
|
, tek_tektronixapname TEXT
|
||||||
|
, estimatedclosedate TEXT
|
||||||
|
, parentaccountidname TEXT
|
||||||
|
, parentcontactidname TEXT
|
||||||
|
, tek_productidname TEXT
|
||||||
|
, tek_productfamilyidname TEXT
|
||||||
|
, transactioncurrencyidname TEXT
|
||||||
|
, tek_unitpricetotal_base TEXT
|
||||||
|
, tek_totaldiscountpercent TEXT
|
||||||
|
, totaldiscountamount_base TEXT
|
||||||
|
, estimatedvalue_base TEXT
|
||||||
|
, totalamount TEXT
|
||||||
|
, tek_salesfunnelstagename TEXT
|
||||||
|
, tek_funnelstagenumber TEXT
|
||||||
|
, statuscodename TEXT
|
||||||
|
, statecodename TEXT
|
||||||
|
, tek_regionidname TEXT
|
||||||
|
, tek_accountmanageridname TEXT
|
||||||
|
, tek_oppterritoryidname TEXT
|
||||||
|
, tek_opp_includeinforecastname TEXT
|
||||||
|
, tek_isriskname TEXT
|
||||||
|
, tek_opportunityage TEXT
|
||||||
|
, createdon TEXT
|
||||||
|
, createdbyname TEXT
|
||||||
|
, tek_piplinelastupdatedon TEXT
|
||||||
|
, tek_laststatusdate TEXT
|
||||||
|
, tek_channelidname TEXT
|
||||||
|
, tek_purchasemethodname TEXT
|
||||||
|
, campaignidname TEXT
|
||||||
|
, tek_webvisitormedium TEXT
|
||||||
|
, tek_webvisitorsource TEXT
|
||||||
|
, tek_customerapplication TEXT
|
||||||
|
, tek_vertical_segmentname TEXT
|
||||||
|
, tek_competitivestatusname TEXT
|
||||||
|
, tek_importantopportunityname TEXT
|
||||||
|
, tek_applicationidname TEXT
|
||||||
|
, tek_industryidname TEXT
|
||||||
|
, tek_taglist TEXT
|
||||||
|
, discountamount TEXT
|
||||||
|
, tek_terr_areaidname TEXT
|
||||||
|
, tek_terr_branchidname TEXT
|
||||||
|
, tek_extension TEXT
|
||||||
|
, tek_companynamelegal TEXT
|
||||||
|
, accountnumber TEXT
|
||||||
|
, tek_marketing_program_type_idname TEXT
|
||||||
|
, tek_leadnumber TEXT
|
||||||
|
, tek_contactnumber TEXT
|
||||||
|
, etl_tx_dt TIMESTAMP
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
SERVER pgsql_server_S98_S OPTIONS(schema_name 'data_api', table_name 'crm_opp' );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,215 @@
|
||||||
|
|
||||||
|
create table if not exists p10_sa.S98_S_crm_opp (
|
||||||
|
tek_opportunitynumber TEXT
|
||||||
|
, name TEXT
|
||||||
|
, tek_tektronixapname TEXT
|
||||||
|
, estimatedclosedate TEXT
|
||||||
|
, parentaccountidname TEXT
|
||||||
|
, parentcontactidname TEXT
|
||||||
|
, tek_productidname TEXT
|
||||||
|
, tek_productfamilyidname TEXT
|
||||||
|
, transactioncurrencyidname TEXT
|
||||||
|
, tek_unitpricetotal_base TEXT
|
||||||
|
, tek_totaldiscountpercent TEXT
|
||||||
|
, totaldiscountamount_base TEXT
|
||||||
|
, estimatedvalue_base TEXT
|
||||||
|
, totalamount TEXT
|
||||||
|
, tek_salesfunnelstagename TEXT
|
||||||
|
, tek_funnelstagenumber TEXT
|
||||||
|
, statuscodename TEXT
|
||||||
|
, statecodename TEXT
|
||||||
|
, tek_regionidname TEXT
|
||||||
|
, tek_accountmanageridname TEXT
|
||||||
|
, tek_oppterritoryidname TEXT
|
||||||
|
, tek_opp_includeinforecastname TEXT
|
||||||
|
, tek_isriskname TEXT
|
||||||
|
, tek_opportunityage TEXT
|
||||||
|
, createdon TEXT
|
||||||
|
, createdbyname TEXT
|
||||||
|
, tek_piplinelastupdatedon TEXT
|
||||||
|
, tek_laststatusdate TEXT
|
||||||
|
, tek_channelidname TEXT
|
||||||
|
, tek_purchasemethodname TEXT
|
||||||
|
, campaignidname TEXT
|
||||||
|
, tek_webvisitormedium TEXT
|
||||||
|
, tek_webvisitorsource TEXT
|
||||||
|
, tek_customerapplication TEXT
|
||||||
|
, tek_vertical_segmentname TEXT
|
||||||
|
, tek_competitivestatusname TEXT
|
||||||
|
, tek_importantopportunityname TEXT
|
||||||
|
, tek_applicationidname TEXT
|
||||||
|
, tek_industryidname TEXT
|
||||||
|
, tek_taglist TEXT
|
||||||
|
, discountamount TEXT
|
||||||
|
, tek_terr_areaidname TEXT
|
||||||
|
, tek_terr_branchidname TEXT
|
||||||
|
, tek_extension TEXT
|
||||||
|
, tek_companynamelegal TEXT
|
||||||
|
, accountnumber TEXT
|
||||||
|
, tek_marketing_program_type_idname TEXT
|
||||||
|
, tek_leadnumber TEXT
|
||||||
|
, tek_contactnumber TEXT
|
||||||
|
, etl_tx_dt TIMESTAMP
|
||||||
|
) ;
|
||||||
|
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_opportunitynumber IS 'tek_opportunitynumber';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.name IS 'name';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_tektronixapname IS 'tek_tektronixapname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.estimatedclosedate IS 'estimatedclosedate';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.parentaccountidname IS 'parentaccountidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.parentcontactidname IS 'parentcontactidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_productidname IS 'tek_productidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_productfamilyidname IS 'tek_productfamilyidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.transactioncurrencyidname IS 'transactioncurrencyidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_unitpricetotal_base IS 'tek_unitpricetotal_base';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_totaldiscountpercent IS 'tek_totaldiscountpercent';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.totaldiscountamount_base IS 'totaldiscountamount_base';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.estimatedvalue_base IS 'estimatedvalue_base';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.totalamount IS 'totalamount';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_salesfunnelstagename IS 'tek_salesfunnelstagename';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_funnelstagenumber IS 'tek_funnelstagenumber';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.statuscodename IS 'statuscodename';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.statecodename IS 'statecodename';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_regionidname IS 'tek_regionidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_accountmanageridname IS 'tek_accountmanageridname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_oppterritoryidname IS 'tek_oppterritoryidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_opp_includeinforecastname IS 'tek_opp_includeinforecastname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_isriskname IS 'tek_isriskname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_opportunityage IS 'tek_opportunityage';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.createdon IS 'createdon';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.createdbyname IS 'createdbyname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_piplinelastupdatedon IS 'tek_piplinelastupdatedon';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_laststatusdate IS 'tek_laststatusdate';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_channelidname IS 'tek_channelidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_purchasemethodname IS 'tek_purchasemethodname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.campaignidname IS 'campaignidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_webvisitormedium IS 'tek_webvisitormedium';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_webvisitorsource IS 'tek_webvisitorsource';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_customerapplication IS 'tek_customerapplication';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_vertical_segmentname IS 'tek_vertical_segmentname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_competitivestatusname IS 'tek_competitivestatusname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_importantopportunityname IS 'tek_importantopportunityname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_applicationidname IS 'tek_applicationidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_industryidname IS 'tek_industryidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_taglist IS 'tek_taglist';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.discountamount IS 'discountamount';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_terr_areaidname IS 'tek_terr_areaidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_terr_branchidname IS 'tek_terr_branchidname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_extension IS 'tek_extension';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_companynamelegal IS 'tek_companynamelegal';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.accountnumber IS 'accountnumber';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_marketing_program_type_idname IS 'tek_marketing_program_type_idname';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_leadnumber IS 'tek_leadnumber';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.tek_contactnumber IS 'tek_contactnumber';
|
||||||
|
COMMENT ON COLUMN p10_sa.S98_S_crm_opp.etl_tx_dt IS '';
|
||||||
|
|
||||||
|
COMMENT ON TABLE p10_sa.S98_S_crm_opp IS '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table if not exists p12_sfull.S98_S_crm_opp (
|
||||||
|
tek_opportunitynumber TEXT
|
||||||
|
, name TEXT
|
||||||
|
, tek_tektronixapname TEXT
|
||||||
|
, estimatedclosedate TEXT
|
||||||
|
, parentaccountidname TEXT
|
||||||
|
, parentcontactidname TEXT
|
||||||
|
, tek_productidname TEXT
|
||||||
|
, tek_productfamilyidname TEXT
|
||||||
|
, transactioncurrencyidname TEXT
|
||||||
|
, tek_unitpricetotal_base TEXT
|
||||||
|
, tek_totaldiscountpercent TEXT
|
||||||
|
, totaldiscountamount_base TEXT
|
||||||
|
, estimatedvalue_base TEXT
|
||||||
|
, totalamount TEXT
|
||||||
|
, tek_salesfunnelstagename TEXT
|
||||||
|
, tek_funnelstagenumber TEXT
|
||||||
|
, statuscodename TEXT
|
||||||
|
, statecodename TEXT
|
||||||
|
, tek_regionidname TEXT
|
||||||
|
, tek_accountmanageridname TEXT
|
||||||
|
, tek_oppterritoryidname TEXT
|
||||||
|
, tek_opp_includeinforecastname TEXT
|
||||||
|
, tek_isriskname TEXT
|
||||||
|
, tek_opportunityage TEXT
|
||||||
|
, createdon TEXT
|
||||||
|
, createdbyname TEXT
|
||||||
|
, tek_piplinelastupdatedon TEXT
|
||||||
|
, tek_laststatusdate TEXT
|
||||||
|
, tek_channelidname TEXT
|
||||||
|
, tek_purchasemethodname TEXT
|
||||||
|
, campaignidname TEXT
|
||||||
|
, tek_webvisitormedium TEXT
|
||||||
|
, tek_webvisitorsource TEXT
|
||||||
|
, tek_customerapplication TEXT
|
||||||
|
, tek_vertical_segmentname TEXT
|
||||||
|
, tek_competitivestatusname TEXT
|
||||||
|
, tek_importantopportunityname TEXT
|
||||||
|
, tek_applicationidname TEXT
|
||||||
|
, tek_industryidname TEXT
|
||||||
|
, tek_taglist TEXT
|
||||||
|
, discountamount TEXT
|
||||||
|
, tek_terr_areaidname TEXT
|
||||||
|
, tek_terr_branchidname TEXT
|
||||||
|
, tek_extension TEXT
|
||||||
|
, tek_companynamelegal TEXT
|
||||||
|
, accountnumber TEXT
|
||||||
|
, tek_marketing_program_type_idname TEXT
|
||||||
|
, tek_leadnumber TEXT
|
||||||
|
, tek_contactnumber TEXT
|
||||||
|
, etl_tx_dt TIMESTAMP
|
||||||
|
) ;
|
||||||
|
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_opportunitynumber IS 'tek_opportunitynumber';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.name IS 'name';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_tektronixapname IS 'tek_tektronixapname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.estimatedclosedate IS 'estimatedclosedate';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.parentaccountidname IS 'parentaccountidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.parentcontactidname IS 'parentcontactidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_productidname IS 'tek_productidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_productfamilyidname IS 'tek_productfamilyidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.transactioncurrencyidname IS 'transactioncurrencyidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_unitpricetotal_base IS 'tek_unitpricetotal_base';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_totaldiscountpercent IS 'tek_totaldiscountpercent';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.totaldiscountamount_base IS 'totaldiscountamount_base';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.estimatedvalue_base IS 'estimatedvalue_base';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.totalamount IS 'totalamount';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_salesfunnelstagename IS 'tek_salesfunnelstagename';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_funnelstagenumber IS 'tek_funnelstagenumber';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.statuscodename IS 'statuscodename';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.statecodename IS 'statecodename';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_regionidname IS 'tek_regionidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_accountmanageridname IS 'tek_accountmanageridname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_oppterritoryidname IS 'tek_oppterritoryidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_opp_includeinforecastname IS 'tek_opp_includeinforecastname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_isriskname IS 'tek_isriskname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_opportunityage IS 'tek_opportunityage';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.createdon IS 'createdon';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.createdbyname IS 'createdbyname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_piplinelastupdatedon IS 'tek_piplinelastupdatedon';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_laststatusdate IS 'tek_laststatusdate';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_channelidname IS 'tek_channelidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_purchasemethodname IS 'tek_purchasemethodname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.campaignidname IS 'campaignidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_webvisitormedium IS 'tek_webvisitormedium';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_webvisitorsource IS 'tek_webvisitorsource';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_customerapplication IS 'tek_customerapplication';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_vertical_segmentname IS 'tek_vertical_segmentname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_competitivestatusname IS 'tek_competitivestatusname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_importantopportunityname IS 'tek_importantopportunityname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_applicationidname IS 'tek_applicationidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_industryidname IS 'tek_industryidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_taglist IS 'tek_taglist';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.discountamount IS 'discountamount';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_terr_areaidname IS 'tek_terr_areaidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_terr_branchidname IS 'tek_terr_branchidname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_extension IS 'tek_extension';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_companynamelegal IS 'tek_companynamelegal';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.accountnumber IS 'accountnumber';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_marketing_program_type_idname IS 'tek_marketing_program_type_idname';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_leadnumber IS 'tek_leadnumber';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.tek_contactnumber IS 'tek_contactnumber';
|
||||||
|
COMMENT ON COLUMN p12_sfull.S98_S_crm_opp.etl_tx_dt IS '';
|
||||||
|
|
||||||
|
COMMENT ON TABLE p12_sfull.S98_S_crm_opp IS '';
|
||||||
|
|
|
@ -184,6 +184,15 @@ retries=3,
|
||||||
dag=dag)
|
dag=dag)
|
||||||
|
|
||||||
|
|
||||||
|
crm_opp = SSHOperator(
|
||||||
|
ssh_hook=sshHook,
|
||||||
|
task_id='crm_opp',
|
||||||
|
command='/data/airflow/etl/SA/run_sa.sh {{ ds_nodash }} {{ params.my_param }} >>/data/airflow/logs/run_psql_{{ds_nodash}}.log 2>&1 ',
|
||||||
|
params={'my_param':"S98_S_crm_opp"},
|
||||||
|
depends_on_past=False,
|
||||||
|
retries=3,
|
||||||
|
dag=dag)
|
||||||
|
|
||||||
file_CRM_account >> crm_account_4545
|
file_CRM_account >> crm_account_4545
|
||||||
file_CRM_contact_ccp >> crm_contact_ccp_5681
|
file_CRM_contact_ccp >> crm_contact_ccp_5681
|
||||||
file_CCP_mapping_table >> ccp_mapping_table_8972
|
file_CCP_mapping_table >> ccp_mapping_table_8972
|
||||||
|
@ -193,4 +202,5 @@ crm_contact_ccp_5681 >> t01_crm_cust_ccp
|
||||||
ccp_mapping_table_8972 >> T01_CRM_CCP_TYPE
|
ccp_mapping_table_8972 >> T01_CRM_CCP_TYPE
|
||||||
crm_contact_part_605 >> t01_crm_contact
|
crm_contact_part_605 >> t01_crm_contact
|
||||||
crm_account_4545 >> t01_crm_account
|
crm_account_4545 >> t01_crm_account
|
||||||
t01_crm_account >> task_failed
|
file_crm_opp >> crm_opp
|
||||||
|
crm_opp >> task_failed
|
||||||
|
|
Loading…
Reference in New Issue