Database query


#1

Hi all,
Whatever I do, even the simplest select * from #table#t with the Database Query Node. I obtain always the same result
ERROR Database Query 0:2418:0:2508 Execute failed: Error while compiling statement: FAILED: ParseException line 170:277 cannot recognize input near ‘)’ ‘tempTable_1458172955640861233’ ‘LIMIT’ in subquery source. Anybody has an idea ?

Knime 3.6 Windows

Fabien


#2

Fabien-

It’s hard to answer entirely answer without knowing the database connection that is preceding the Database Query Node. I’m assuming you are using SQLite. Try select * from #table# as temp.

As a SIMPLE example using a different database source (should not matter), I have a Database Table Connector Node with a basic query: select * from Notes. (Notes is a table in my database.)

I can then add a Database Query Node and use: select * from #table# as temp where note_id=1.

After it runs, you can see the Knime SQL Statement: SELECT * FROM (SELECT * FROM Notes) AS TEMP WHERE note_id=1 in the connection tab of the node. As it says in the Node description, #table# is the incoming SQL statement (in my example: SELECT * FROM Notes.)

Hope this helps.

Adriane


#3

Hi Adriane,

It’s a Hive connection. And yes your trick works ! Thanks,

Fabien