Skip to main content
Solved

Example SQLITE reader with SQL Parameters

  • June 10, 2017
  • 2 replies
  • 18 views

kimo
Contributor
Forum|alt.badge.img+10

What is the format for the SELECT option? I cannot get this to work, it has to be empty. I expected it to be something like: column1, column2

but that gives an error

Best answer by takashi

Hi @kimo, you can set a SQL SELECT statement to the SELECT Statement parameter to perform query on the database. The reader feature type outputs the query result, regardless of the schema configuration displayed on Workbench Canvas.

For example, if you set this SELECT statement to the parameter, the reader feature type reads features having column1 and column2 from "my_table" table.

select column1, column2 from my_table

The SQLCreator/SQLExecutor can be used to execute any SQL statements more conveniently, so I don't know the SELECT Statement parameter in a database reader feature type should be used in what kind of situation.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • Best Answer
  • June 10, 2017

Hi @kimo, you can set a SQL SELECT statement to the SELECT Statement parameter to perform query on the database. The reader feature type outputs the query result, regardless of the schema configuration displayed on Workbench Canvas.

For example, if you set this SELECT statement to the parameter, the reader feature type reads features having column1 and column2 from "my_table" table.

select column1, column2 from my_table

The SQLCreator/SQLExecutor can be used to execute any SQL statements more conveniently, so I don't know the SELECT Statement parameter in a database reader feature type should be used in what kind of situation.


kimo
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 11, 2017

Thank you for the example, sadly missing in the help. I was only putting in column1,column2. I did not have to enter where in the where clause.