在Pentaho中对查询进行变量替换时,不执行表输入步骤

在Pentaho中对查询进行变量替换时,不执行表输入步骤,pentaho,pentaho-spoon,pentaho-data-integration,Pentaho,Pentaho Spoon,Pentaho Data Integration,下面是查询 从表格X中选择*,其中c_trans_date>=(选择 转换(DATETIME,concat(1',-,(子字符串('${SHORT_FILENAME}',charindex('.','${SHORT_FILENAME}',1)-5,3)),'-',子字符串('${SHORT_FILENAME}',charindex('.','${SHORT_FILENAME}',1)-2,2)),121)) 和c_trans_dateAhhrggg。。。哦,不。。。请不要。。。DateTimeF

下面是查询

从表格X中选择*,其中c_trans_date>=(选择 转换(DATETIME,concat(1',-,(子字符串('${SHORT_FILENAME}',charindex('.','${SHORT_FILENAME}',1)-5,3)),'-',子字符串('${SHORT_FILENAME}',charindex('.','${SHORT_FILENAME}',1)-2,2)),121)) 和c_trans_dateAhhrggg。。。哦,不。。。请不要。。。DateTimeFormat在MS server中运行,但不在PDI中运行。。。不是那个。。。再也不会了

首先选中
输入表
步骤中的
启用延迟转换
复选框

如果问题仍然存在,您可以尝试编辑连接。在左侧面板上,选择
Advanced
并选中/取消选中
支持时间戳数据类型

如果问题仍然存在,那么你必须找出问题所在。使用SELECT*读取表格,并尝试使用
选择值
/
元数据
步骤转换日期,然后播放格式


如果仍然找不到bug,请尝试用更PDI的方式而不是用一个sql来解决问题。据我所知,数据格式取决于
${SHORT_FILENAME}
,因此您可以使用该变量
将/Case
切换到适当的
选择值
/
元数据
/
日期格式
,并将子选择迁移到相应的
查找
筛选行
。[请允许我先运行一个测试,然后再抱怨性能差]。

有帮助吗?你需要更多的支持吗?
2017/08/18 10:25:54 - Spoon - Transformation opened.
2017/08/18 10:25:54 - Spoon - Launching transformation [STATEX_DATA_PULL]...
2017/08/18 10:25:54 - Spoon - Started the transformation execution.
2017/08/18 10:25:54 - STATEX_DATA_PULL - Dispatching started for transformation [STATEX_DATA_PULL]
2017/08/18 10:25:54 - Input table.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Unexpected error
2017/08/18 10:25:54 - Input table.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2017/08/18 10:25:54 - Input table.0 - Couldn't get row from result set
2017/08/18 10:25:54 - Input table.0 - Conversion failed when converting date and/or time from character string.
2017/08/18 10:25:54 - Input table.0 - 
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.core.database.Database.getRow(Database.java:2374)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.core.database.Database.getRow(Database.java:2344)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.core.database.Database.getRow(Database.java:2322)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:247)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:138)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2017/08/18 10:25:54 - Input table.0 -   at java.lang.Thread.run(Unknown Source)
2017/08/18 10:25:54 - Input table.0 - Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string.
2017/08/18 10:25:54 - Input table.0 -   at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
2017/08/18 10:25:54 - Input table.0 -   at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853)
2017/08/18 10:25:54 - Input table.0 -   at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781)
2017/08/18 10:25:54 - Input table.0 -   at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034)
2017/08/18 10:25:54 - Input table.0 -   at org.pentaho.di.core.database.Database.getRow(Database.java:2362)
2017/08/18 10:25:54 - Input table.0 -   ... 6 more
2017/08/18 10:25:54 - Input table.0 - Finished reading query, closing connection.
2017/08/18 10:25:54 - Input table.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
2017/08/18 10:25:54 - STATEX_DATA_PULL - Transformation detected one or more steps with errors.
2017/08/18 10:25:54 - STATEX_DATA_PULL - Transformation is killing the other steps!
2017/08/18 10:25:54 - STATEX_DATA_PULL - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Errors detected!
2017/08/18 10:25:54 - Spoon - The transformation has finished!!
2017/08/18 10:25:54 - STATEX_DATA_PULL - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Errors detected!
2017/08/18 10:25:54 - STATEX_DATA_PULL - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Errors detected!