the first port is static data for example, Excel, csv, text files; the parameterized node is used generally is for extract information about values in specific columns of tables
the Parameterized Database Query node allows you to execute a single query with varying parameters. The node expects a dark red database connection as input. These are the database connections that in addition to the connection information also contain a SQL statement that define the data to work with. The Parameterized Database Query node replaces the #TABLE# placeholder with the SQL statement of the input port. Attached you can find a simple example workflow with the node.
Thanks for this example. It was very helpful. Nevertheless, I cannot manage to achieve what I need: looping on the table partition name to retrieve only a limited set of data from those partitions. It seems KNIME does not recognize the partition keyword in the Parameterized DB Query Reader node.
a propper query in the parameterized DB Query Node based on the example wf above goes like this:
SELECT * FROM #table# where âUniverse_1_0â > 0.2 and âCluster Membershipâ like âCluster_0â
it is a bit confusing for string parametrisation that the columns are writen in " but if you choose ´ for the criteria it worksâŚ
I am stuck on a similar nuance with the Parameterized Database Query node. I canât get it to work using $," or â in any fashion - I tried to use the example and it seems to work fine in that. Any tips for how to make the following work? I want to filter client_Key from the database using an table creator where input=18 and both are integers:
Error Message:
ERROR Parameterized Database Query 2:870 Execute failed: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword âwhereâ.
Youâre right - thanks! I needed to replace the #table# with the actual table name including the string starting from the server i.e.
SELECT * FROM [COMPANY_EDW].[Fact].[WorkOrders] where âClient_Keyâ = $input$
Any suggestions for making this work faster? In some cases my parameter list is thousands of rows longâŚ