
DROP TABLE IF EXISTS p20_pdm.t01_scrm_leads;
CREATE TABLE IF NOT EXISTS p20_pdm.t01_scrm_leads (
	 customer_id  varchar(30) 
	, date  timestamp(0) 
	, target_name  varchar(30) 
	, c_name  varchar(30) 
	, c_type  varchar(30) 
	, content_name  varchar(30) 
	, source  varchar(50) 
	, tag  varchar(30) 
	, c_keyword  varchar(30) 
	, attr2  varchar(30) 
	, label  varchar(30) 
	, group_label  varchar(30) 
	, Etl_Batch_No  varchar(50) 
	, Etl_First_Dt  timestamp(0) 
	, Etl_Job  varchar(50) 
	, Etl_Proc_Dt  timestamp(0) 
	, Etl_Tx_Dt  timestamp(0) 
	, Src_Sysname  varchar(50) 
	, Src_Table  varchar(50) 
	,primary key( customer_id,date )
);

 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.customer_id IS 'customerId'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.date IS 'date'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.target_name IS 'targetName'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.c_name IS 'c_name'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.c_type IS 'c_type'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.content_name IS 'contentName'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.source IS 'source'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.tag IS 'tag'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.c_keyword IS 'c_keyword'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.attr2 IS 'attr2'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.label IS 'label'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.group_label IS 'groupLabel'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Etl_Batch_No IS '作业批次号'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Etl_First_Dt IS '最初入库时间'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Etl_Job IS '作业名称'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Etl_Proc_Dt IS '本次入库时间'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Etl_Tx_Dt IS '作业运行时间'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Src_Sysname IS '来源系统'; 
 COMMENT ON COLUMN p20_pdm.t01_scrm_leads.Src_Table IS '来源表'; 

COMMENT ON TABLE p20_pdm.t01_scrm_leads IS 'SCRM线索';