Studio DBConnector action failing with generic 'Invalid Input' on complex WHERE clause

I’m trying to pull customer data from our internal SQL database using the DBConnector action in a CXone Studio script. The basic select works fine when I just query by a simple integer ID, but as soon as I add a WHERE clause that involves string matching or multiple conditions, the action fails silently with a generic ‘Invalid Input’ error code. The documentation doesn’t give much detail on what constitutes invalid input beyond syntax errors, and the SQL looks valid when I run it directly in SSMS.

Here is the snippet I am using for the DBConnector configuration:

{
 "actionType": "DBConnector",
 "connectionId": "conn_12345",
 "queryType": "SELECT",
 "sql": "SELECT * FROM Customers WHERE CustomerID = @input.customerId AND Status = 'Active'",
 "resultVariable": "dbResult"
}

The @input.customerId is passed correctly from the previous node, and I’ve verified the value is a clean integer. I’ve also tried escaping the single quotes around ‘Active’ with backslashes and double quotes, but nothing changes the outcome. The error log just says “Invalid Input” without pointing to a specific token or character.

I’m wondering if there’s a limitation on the complexity of the WHERE clause allowed in the DBConnector action. Maybe it only supports simple equality checks on indexed columns? I’ve seen some older forum posts mentioning performance issues with complex queries, but nothing about outright failures for valid SQL.

Also, I tried using parameterized queries like WHERE Status = @status and passing ‘Active’ as a variable, but that didn’t help either. The same error persists. Is there a way to see the actual SQL string being sent to the database before it hits the server? That would help me debug if the issue is with how Studio is formatting the query behind the scenes.