update20260427
This commit is contained in:
26
05 dm_td_external_exchangerate.sql
Normal file
26
05 dm_td_external_exchangerate.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- Databricks notebook source
|
||||
/*
|
||||
修改日期:20250311
|
||||
修改人:chenwu
|
||||
修改内容:取sales表中最大日期的年
|
||||
*/
|
||||
insert OVERWRITE dm.dm_td_external_exchangerate (
|
||||
from_currency_id, to_currency_id, az_year, exchange_rate, etl_update_dt, etl_insert_dt
|
||||
)
|
||||
select
|
||||
from_currency_id,
|
||||
to_currency_id,
|
||||
az_year,
|
||||
exchange_rate,
|
||||
etl_update_dt,
|
||||
etl_insert_dt
|
||||
from
|
||||
dm.DM_TD_EXCHANGE_RATE
|
||||
where
|
||||
AZ_YEAR in (
|
||||
select
|
||||
left(max(YYYYMM), 4)
|
||||
from
|
||||
dm.dm_tf_ext_unionall_sales --取sales表中最大日期的年
|
||||
)
|
||||
AND FROM_CURRENCY_ID = 'USD'
|
||||
Reference in New Issue
Block a user