Skip to main content
Solved

Example SQLITE reader with SQL Parameters


kimo
Contributor
Forum|alt.badge.img+10
  • Contributor

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.

View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings