Files
MarketAnalysis-ETL/EXTERNAL/CHPA/03 dm_ims_td_market_property.sql
2026-04-20 14:55:25 +08:00

35 lines
859 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Databricks notebook source
-- 源表DWD.DWD_TD_IMS_MARKET_TA_ORDER
-- 目标表DM.DM_IMS_TD_MARKET_PROPERTY
-- COMMAND ----------
update dwd.dwd_td_ims_market_ta_order
set
market = 'Pulmicort VBP Benchmark Market'
where
market = 'Pumicort VBP Benchmark Market'
-- COMMAND ----------
--dm market property 市场相关属性和market&ta 的排序 by qingli 20230425
insert overwrite table dm.dm_ims_td_market_property
select
market_order,
bu as bu,
ta as ta_key,
case
when ta = 'ONC' then 'ONCO'
else ta
end as ta,
market as market_key,
case
when market = 'ONC Market' then 'ONCO Market'
else market
end as market,
null as svg,
ta_order,
from_utc_timestamp (current_timestamp(), 'UTC+8') ETL_INSERT_DT,
from_utc_timestamp (current_timestamp(), 'UTC+8') ETL_UPDATE_DT
from
dwd.dwd_td_ims_market_ta_order