首页 Dataphin逻辑表补数据执行报错:com.aliyun.odps.OdpsException: ODPS-0130071:Semantic analysis exception - column D_MONTHS in source has incompatible type DATETIME with destination column d_months

Dataphin逻辑表补数据执行报错:com.aliyun.odps.OdpsException: ODPS-0130071:Semantic analysis exception - column D_MONTHS in source has incompatible type DATETIME with destination column d_months

更新时间: 2022-08-11 16:06:38

问题描述

维度逻辑表中d_months字段的类型是DATETIME类型,但是补数据时发现物化表sdiccy_cdm.dws_fund_months_od000_v1中该字段类型却是DATE类型。导致补数据操作报错:com.aliyun.odps.OdpsException: ODPS-0130071:Semantic analysis exception - column D_MONTHS in source has incompatible type DATETIME with destination column d_months。

补数据运行报字段类型不匹配错误,完整的报错信息如下:

2022-08-05 15:34:11.497 com.aliyun.odps.OdpsException: ODPS-0130071:[2,8] Semantic analysis exception - column D_MONTHS in source has incompatible type DATETIME with destination column d_months, which has type DATE

 at com.aliyun.odps.Instance.waitForSuccess(Instance.java:809)
 at com.aliyun.odps.Instance.waitForSuccess(Instance.java:786)
 at com.alibaba.dt.oneservice.sdk.OdpsSqlExecutor.run(OdpsSqlExecutor.java:86)
 at com.alibaba.dt.oneservice.sdk.OdpsTask.runTask(OdpsTask.java:94)
 at com.alibaba.dt.oneservice.sdk.task.BaseOsTask.run(BaseOsTask.java:116)
 at com.alibaba.dt.oneservice.sdk.job.OsJob.run(OsJob.java:219)
 at com.alibaba.dt.oneservice.sdk.executor.BaseOsExecutor.lambda$run$0(BaseOsExecutor.java:48)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
 at java.lang.Thread.run(Thread.java:882)

问题原因

创建派生指标以后,修改了维度的字段类型导致。派生指标创建好之后,物化表的字段类型不会随之变动,如果后续有修改关联的维度,需要重新创建派生指标。

解决方案

删掉派生指标重新创建之后问题解决。

适用于

  • Dataphin