LOAD

LOAD,第1张

LOAD

关于kettle 写入mysql 遇到一个问题:LOAD_TEMP - Unable to get database metadata from this database connection,报错大致如下:

2021/11/26 14:05:12 - LOAD_TEMP - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2021/11/26 14:05:12 - LOAD_TEMP - Unable to get database metadata from this database connection
2021/11/26 14:05:12 - LOAD_TEMP -  at java.lang.Thread.run (Thread.java:748)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.step.RunThread.run (RunThread.java:121)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.step.baseStep.markStop (baseStep.java:2995)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.Trans.stepFinished (Trans.java:1244)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.Trans.access0 (Trans.java:155)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.Trans.killAllNoWait (Trans.java:1727)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.step.baseStep.stopAll (baseStep.java:2866)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.Trans.stopAll (Trans.java:1892)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.trans.steps.sql.ExecSQL.stopRunning (ExecSQL.java:268)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.core.database.Database.cancelQuery (Database.java:660)
2021/11/26 14:05:12 - LOAD_TEMP -  at org.pentaho.di.core.database.Database.getDatabasemetaData (Database.java:2718)
2021/11/26 14:05:12 - LOAD_TEMP - 
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.core.database.Database.getDatabasemetaData(Database.java:2720)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.core.database.Database.cancelQuery(Database.java:660)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.steps.sql.ExecSQL.stopRunning(ExecSQL.java:268)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.Trans.stopAll(Trans.java:1892)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.step.baseStep.stopAll(baseStep.java:2866)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.Trans.killAllNoWait(Trans.java:1727)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.Trans.access0(Trans.java:155)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.Trans.stepFinished(Trans.java:1244)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.step.baseStep.markStop(baseStep.java:2995)
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:121)
2021/11/26 14:05:12 - LOAD_TEMP - 	at java.lang.Thread.run(Thread.java:748)
2021/11/26 14:05:12 - LOAD_TEMP - Caused by: java.lang.NullPointerException
2021/11/26 14:05:12 - LOAD_TEMP - 	at org.pentaho.di.core.database.Database.getDatabasemetaData(Database.java:2718)
2021/11/26 14:05:12 - LOAD_TEMP - 	... 10 more
2021/11/26 14:05:12 - LOAD_TEMP - ERROR (version 5.3.0.0-213, build 1 from 2015-02-02_12-17-08 by buildguy) : 错误被检测到!

大致的意思就是 不能获取到数据库中的源数据,在网上查找一番,建议是清理数据库的缓存如下:

工具  --->   数据库  --->  清楚缓存

但是 *** 作下来没有用。

仔细检查了一下影射字段

 在对应的表中,此字段为 is_weak_point ,hive表中的字段拼写错了。是通过获取字段直接来的。看来这个还是得仔细的核对字段名称,避免因字段拼写导致问题。将表字段改成is_weak_point 就行了。

还有一种情况也有可能出现问题。我们一般在hive 中字段类型一般用String 类型,但是业务库中字段却不是,大部分情况下是没有问题,但是遇到 数据库 中使用bit 类型,可能会出问题,一般是文件输入定义字段的时候,将String转成boolean 类型:

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5608909.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存