Hi All @Jonathan-Sherman, @atcodedog05 @Qiu
I have a SQL query and extracting data for my flow using the input tool.
Now I have defined a where clause that says City = 'SF'
SlNo | Value | City |
1 | 100 | SF |
2 | 200 | Manila |
3 | 300 | London |
4 | 400 | Beijing |
5 | 500 | Perth |
How can I actually replace the SF and parameterize this on runtime. So at runtime user can select the City and pull only that data from the query.
Can you please advise ? Thanks
Hi @JDong,
You'll want to use a dynamic input tool to solve this.
The dynamic input tool works in a similar way to the standard input tool, start off by adding your query and connection string in the "Input Data Source Template" (by clicking edit). The main difference between this tool and a standard input, the dynamic input takes an incoming connection (in this case would be the city value you want to pass into the query), we can then modify the SQL query through the configuration pane of the tool.
Select "Modify SQL Query" -> "Add" -> "SQL: Update WHERE Clause"
This will pass the new City value into the query and dynamically edit the WHERE clause you selected. If you have any questions just let us know!
Kind regards,
Jonathan
Thanks. The datasource I am querying has a where clause and I want to replace the 'city' condition with a runtime variable.
I tried using the dynamic input tool but it asks for connection details.
Can you please advise ?
Have you managed to read your SQL query using a standard input tool?
It is throwing an exception when I try the standard input and configure.
It works perfectly with the Salesforce quick connect connection.
You are able to go through the same quick connection option in the Dynamic Input tool also. Edit -> Dropdown -> Data Source -> Salesforce Quick Connect?
I see the above on replacing my connection and using dynamic input tool. For some reason the custom query does not work as expected. Please advise.
The query validates fine !
I used one of the deprecated input connection for Salesforce and the initial connection reads fine...but I am not able to configure the input template for dynamic input tool. Also on trying to configure it disconnects from the 1st input (deprecated) tool.
Any thoughts here please ?