水壶 '?'不工作表输入步骤 [英] Kettle '?' not working Table Input Step

查看:89
本文介绍了水壶 '?'不工作表输入步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从数据库中获取所有表名,然后从表中获取所有行.所以我创建了这样的转换:

I want to get all the table names from the database and then get all the rows from the tables. So I created a transformation like this:

  1. 获取表名:添加数据库连接并将表名存储在名为"tablename"的输出字段中.
  2. 表输入:标记为替换脚本中的变量"和为每一行执行".在从步骤插入数据"中添加了第一步. SQL是"SELECT * from?".
    我已经在线阅读了很多教程,包括文档.
    我的问题是到处都说我是我的?"应替换为参数.但这不会发生.这是日志:
  1. Get Table Names: Added the database connection and stored the table name in a output field called "tablename".
  2. Table Input: Marked "Replace variables in script" and "Execute for each row". Added the first step in "Insert data from step". SQL is "SELECT * from ?".
    I have read up a lot of tutorials online, including the documentation.
    My problem is that everywhere it says that I my "?" should be replaced with the parameter. But this does not happen. Here are the logs:

2013/06/22 03:33:25-获取表名.0-开始运行...
2013/06/22 03:33:25-Postgres 9.1.9 RO-从数据库元数据中读取:9表名称.
2013/06/22 03:33:25-表input.0-找到查询参数= [stackexchange2]
2013/06/22 03:33:25-表input.0-SQL查询:SELECT * from?
2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21构建17588):意外错误
2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21构建17588):org.pentaho.di.core.exception. KettleDatabaseException:
2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21构建17588):执行SQL时发生错误:
2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21构建17588):从*
中选择* 2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21生成17588):错误:"$ 1"或附近的语法错误
位置:16
2013/06/22 03:33:25-表input.0-错误(版本4.4.0稳定,由buildguy从2012-11-21 16.02.21构建17588):

2013/06/22 03:33:25 - Get table names.0 - Starting to run...
2013/06/22 03:33:25 - Postgres 9.1.9 RO - read :9 table names from db meta-data.
2013/06/22 03:33:25 - Table input.0 - Query parameters found = [stackexchange2]
2013/06/22 03:33:25 - Table input.0 - SQL query : SELECT * from ?
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Unexpected error
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : An error occurred executing SQL:
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : SELECT * from ?
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : ERROR: syntax error at or near "$1"
Position: 16
2013/06/22 03:33:25 - Table input.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :

我正在使用Kettle 4.4.从此处下载了勺子客户端.

I am using Kettle 4.4. Downloaded the spoon client from here.

更新
我只想做这个工作.我现在正在学习该工具,并且知道如何使用'?'作品.

UPDATE
I just want to make this work. I am learning the tool right now, and it would be good to know how '?' works.

推荐答案

要解决您的情况,我更喜欢处理作业,请找到{kettle_intalation_folder_path}/examples/jobs/process all table/Process all table.kjb,因为您的情况就是该示例的简化.

To solve your situation, i prefer to work with jobs, please find {kettle_intalation_folder_path}/examples/jobs/process all tables/Process all tables.kjb, because your case is a simplification of that example.

这篇关于水壶 '?'不工作表输入步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆