|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
有一个transformer模型,Data Sources是一个用FM做的包。
但是现在这个FM包中有一个维度的表丢失了,我又没有这个FM的源模型。
那么,有什么办法可以查询这个维度的SQL吗?如图:
我现在是看不到机构维表的数据源,不知道这个维度是取自哪张表。也没有FM源模型,有什么办法可以知道吗?
如果无法查询这个维度的数据源,那么有什么办法可以中和一下呢?例如,小弟试过做一个机构维度的IQD文件传上去,可是无法与FM做的包关联,如果我用FM再做一个包,包里只有一个机构维度,那么能否与这个包做关联?应该怎么做?
或者还有什么别的办法吗?请各位大哥大姐们指点指点。
本来是想要将这张表重做的,但是维度表都可以重做,事实表的度量不知道该怎么说,以前的算法已经丢失了。
现有的数据源中的SQL如图:

这个SQL实在是看不懂,主要是不知道xsum和后面的指标算法是什么意思,不知道有没有哪位高手能帮帮忙将这个SQL写成IQD文件或者是指教下怎么在query里写出来?
如果直接拷贝之后放在query里会显示缺少右括号。
事实表的SQL如下:
select
case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end as 半年,
DM_PRPLRPREPARE.STATISTIC_MONTH as 统计月份,
to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') as 出险年份,
case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end as 出险半年,
((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)) as 出险季度,
to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm') as 出险月份,
DM_PRPLRPREPARE.ORG_ID as 机构ID,
DM_PRPLRPREPARE.KIND_ID as 险别ID,
DM_PRPLRPREPARE.CURRENCY as 币别ID,
DM_PRPLRPREPARE.BUSINESS_TYPE as 业务类型ID,
DM_PRPLRPREPARE.BUSINESSNATURE_ID as 业务渠道ID,
DM_PRPLRPREPARE.CARNATURE_ID as 车型ID,
DM_PRPLRPREPARE.CI_FEE_CATEGORY as 交强险赔付类型ID,
DM_PRPLRPREPARE.CARBUSINESS_ID as 商业车险费率分类ID,
XSUM(DM_PRPLRPREPARE.REIN_SETTLED_LOSS_B for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as 再保前已决赔款,
XSUM(DM_PRPLRPREPARE.REIN_AM_SETTLED_LOSS for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as 再保摊回已决赔款,
XSUM(DM_PRPLRPREPARE.REIN_SETTLED_LOSS_A for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as 再保后已决赔款,
XSUM(DM_PRPLRPREPARE.REIN_SETTLED_ALAE_B for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as c18,
XSUM(DM_PRPLRPREPARE.REIN_AM_SETTLED_ALAE for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as c19,
XSUM(DM_PRPLRPREPARE.REIN_SETTLED_ALAE_A for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ID,DM_PRPLRPREPARE.KIND_ID,DM_PRPLRPREPARE.CURRENCY,DM_PRPLRPREPARE.BUSINESS_TYPE,DM_PRPLRPREPARE.BUSINESSNATURE_ID,DM_PRPLRPREPARE.CARNATURE_ID,DM_PRPLRPREPARE.CI_FEE_CATEGORY,DM_PRPLRPREPARE.CARBUSINESS_ID ) as c20,
XSUM(DM_PRPLRPREPARE.REIN_SETTLED_ULAE_B for case when (to_number(substr(to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.STATISTIC_MONTH,'yyyy') || 'H2') end ,DM_PRPLRPREPARE.STATISTIC_MONTH,to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy'),case when (to_number(substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),5,6)) <= 6) then (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H1') else (to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyy') || 'H2') end ,((substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),1,4) || 'Q') || substr(to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyyq'),5,6)),to_char(DM_PRPLRPREPARE.ACCIDENT_MONTH,'yyyymm'),DM_PRPLRPREPARE.ORG_ |
|