首页 > 技术文章 > 工时 -- 累计确认收入(工时对应收入)-人民币指标 测试过程

simpledu 2022-01-08 13:52 原文

查询项目编号 = IM2111485311 的项目id

select dpp_id from iss_dim.dim_pm_prjinfo where dpp_prjcode = 'IM2111485311'

--  项目id   164853

-- 累计确认收入(工时对应收入)-人民币  查询edm"项目编号" = 'IM2111485311'的这个指标的值
select * from iss_edm.edm_pm_summary_fact where cumulative_confirm_income_rmb is not null;
164853 prj_id "项目编号" = 'IM2111485311';
6240.00 cumulative_confirm_income_rmb
2021-12-01 accperiod

-- 查询dwd层"项目编号" = 'IM2111485311'在近三年的这个指标的值

select "累计确认收入(工时对应收入)-人民币",* from iss_dwd.dwd_pm_Report_Acceptance_Billing_PrjMonth where date("服务年月") >= '2019-01-01'
and date("服务年月") <= '2022-01-01' and "项目编号" = 'IM2111485311' order by "服务年月";

 

-- 这里的累计确认收入(工时对应收入)-人民币edm层的表取数只取到了执行时间为2021-12-01日的数,2021-12-31的数没有取到
-- 这里需要看一下执行时间怎么处理变成最新的时间

 再看一下ind层的情况

 

--查询edw层的这条记录

select cumulative_confirm_income_rmb,accperiod,* from iss_edw.edw_pm_Report_Acceptance_Billing_PrjMonth where pm_prjid = 164853;

 

-- 查询ind层累计确认收入(工时对应收入)-人民币   也是这两条并且时间也对,没什么问题

 select * from iss_ind.ind_pm_AcceptanceBillingPrjMonth where gp_prjid = 164853 and gp_indexno = 'PM01308';

 

--  查询edm层累计确认收入(工时对应收入)-人民币

--  select accperiod,cumulative_confirm_income_rmb from iss_edm.edm_pm_summary_fact where prj_id = 164853

 

推荐阅读