Hello
I’m using the Postgres connector and have a requirement to run a query to match a list of values.
I receive a comma-separated list of values (example: value1,value2) and my simplified query in Application Integration is the following:
SELECT * FROM test_table
WHERE process = ?
AND name = ?
AND status = ANY(string_to_array(?, ‘,’))
When running this i get the error:
*[{“@typetypetypetype”:“type.googleapis.com/google.rpc.ErrorInfo",“metadata”:{“cause”:"Server error [SQL state: 42601]: syntax error at or near \“AND\” (Character 50)\n”,“connection_type”:“Postgresql”,“query_string”:"SELECT * FROM agent_status \r\nWHERE process = ? \r\nAND available_day_id = ? \r\nAND agent_status = ANY(string_to_array(?, ‘,’))
*
Already tried building a fixed query to see if it was an issue with data types of the query parameters but i can’t seem to be able to run this query successfuly
Any idea if the function string_to_array() is actually supported using the connector?
Do i have other alternatives other than building a string with all the values and using IN?
thank you!