简体   繁体   English

Pentaho勺变形-错误

[英]Pentaho Spoon Transformation - Errors

I have been trying to run a transformation where I have Table Input with SQL to fetch or query data, tied to output for an excel spreadsheet. 我一直在尝试进行一个转换,在该转换中我使用带有SQL的表输入来获取或查询数据,并绑定到Excel电子表格的输出。

With the following SQL I get multiple errors depending on what I add or take away. 使用以下SQL,根据我添加或删除的内容,我会遇到多个错误。 I am connected to Oracle databases. 我已连接到Oracle数据库。

SELECT FROM .View 

WHERE ((View.Opened_Date 

BETWEEN ' 2016-01-01' 

AND ' 2017-01-01' 

AND View.Owner_Group='OwnerJ' 

AND View.Main_Category1 LIKE '%BUCKETS%'))

I get the following error when trying to preview: 尝试预览时出现以下错误:

Transformation detected one or more steps with errors.

Goes on to say its killed all other steps. 继续说它杀死了所有其他步骤。 No long that I can find. 我找不到了。 Earlier when I ran the SQL I got date errors. 之前,当我运行SQL时,出现日期错误。 Any suggestions would be helpful. 任何的意见都将会有帮助。

You don't seem to be selecting any columns from the table. 您似乎没有从表中选择任何列。
There are leading spaces in the dates and you should apply TO_DATE to the dates that are in string format. 日期中有前导空格,您应该将TO_DATE应用于字符串格式的日期。
There are unnecessary parentheses that could be removed. 有不必要的括号可以删除。
Also, I think that '.View' should be just 'View'. 另外,我认为“ .View”应该只是“ View”。

SELECT column1Name, column2Name, ... FROM View 

WHERE View.Opened_Date 

BETWEEN TO_DATE('2016-01-01', 'yyyy-mm-dd') 

AND TO_DATE('2017-01-01' , 'yyyy-mm-dd')

AND View.Owner_Group='OwnerJ' 

AND View.Main_Category1 LIKE '%BUCKETS%'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM