add workflow 市场易API联系人,dev
This commit is contained in:
parent
82a38c022f
commit
ee4eae17c3
|
|
@ -17,6 +17,7 @@ insert into data_api.api_contact_events (
|
||||||
, meta_name
|
, meta_name
|
||||||
, meta_remark
|
, meta_remark
|
||||||
, properties
|
, properties
|
||||||
|
, contact_id
|
||||||
,etl_tx_dt
|
,etl_tx_dt
|
||||||
)
|
)
|
||||||
select
|
select
|
||||||
|
|
@ -31,6 +32,7 @@ select
|
||||||
, case when trim(both from meta_name)='' then null else meta_name::text end meta_name
|
, case when trim(both from meta_name)='' then null else meta_name::text end meta_name
|
||||||
, case when trim(both from meta_remark)='' then null else meta_remark::text end meta_remark
|
, case when trim(both from meta_remark)='' then null else meta_remark::text end meta_remark
|
||||||
, case when trim(both from properties)='' then null else properties::text end properties
|
, case when trim(both from properties)='' then null else properties::text end properties
|
||||||
|
, case when trim(both from contact_id)='' then null else contact_id::text end contact_id
|
||||||
,etl_tx_dt
|
,etl_tx_dt
|
||||||
from (
|
from (
|
||||||
select
|
select
|
||||||
|
|
@ -45,6 +47,7 @@ select
|
||||||
, (json_array_elements(data::json)::json->>'metaName') meta_name
|
, (json_array_elements(data::json)::json->>'metaName') meta_name
|
||||||
, (json_array_elements(data::json)::json->>'metaRemark') meta_remark
|
, (json_array_elements(data::json)::json->>'metaRemark') meta_remark
|
||||||
, (json_array_elements(data::json)::json->>'properties') properties
|
, (json_array_elements(data::json)::json->>'properties') properties
|
||||||
|
, (json_array_elements(data::json)::json->>'contactId') contact_id
|
||||||
,CURRENT_TIMESTAMP(0) etl_tx_dt
|
,CURRENT_TIMESTAMP(0) etl_tx_dt
|
||||||
from (select * from data_api.api_data
|
from (select * from data_api.api_data
|
||||||
WHERE api_id='a7757b4a-7038-40ef-b11e-81a2c5e0' and is_loaded = '0' order by request_tm desc limit 1) p )p;
|
WHERE api_id='a7757b4a-7038-40ef-b11e-81a2c5e0' and is_loaded = '0' order by request_tm desc limit 1) p )p;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue