CXone Studio DBConnector returning empty result set despite valid SQL

Has anyone figured out why the DBConnector action in a CXone Studio script returns an empty result set when the underlying SQL query executes successfully in the database client? I am integrating a legacy Java orchestration service with NICE CXone, and I need to perform a real-time database lookup during the call flow. The connection profile is configured correctly, as I can retrieve simple scalar values without issue. However, when I attempt to fetch a list of records using a SELECT statement with parameters, the output collection remains empty.

I have verified the SQL syntax by running it directly against the database, and it returns the expected rows. The parameter mapping in the Studio script appears correct, binding the caller’s phone number to the WHERE clause. The error log does not show any connection failures or SQL syntax errors, only a warning about ‘No records found’.

  • I have confirmed that the database user has read permissions for the target table and that the data exists for the test phone number.
  • I have tried simplifying the query to select only one column and removed all parameter bindings, but the result set is still empty in the Studio trace.

Here is the SQL snippet I am using in the DBConnector configuration:

SELECT customer_id, status FROM customer_profiles WHERE phone_number = ? AND status = 'ACTIVE'

Is there a specific limitation on the number of columns or rows returned by the DBConnector action that I am missing?

It depends, but generally… the studio dbconnector often drops rows if the result exceeds 1000 records or if column types don’t match exactly.

check your query for limit 1 first to rule out paging issues, and ensure your sql returns simple varchar types instead of clob or blob.

SELECT CAST(column_name AS VARCHAR(255)) FROM table_name LIMIT 1

Check your DBConnector output mapping for strict type casting issues. The Studio connector silently fails when the driver returns CLOB or BLOB instead of VARCHAR, unlike the Genesys Cloud Data Actions which handle these gracefully.

Force the cast in your SQL query to ensure the JDBC driver returns standard string types. This prevents the empty set result caused by type mismatch during the JSON serialization step.

SELECT CAST(column_name AS VARCHAR(255)) AS column_name FROM table_name LIMIT 1

Have you tried validating the JDBC driver’s serialization behavior? The suggestion above regarding type casting is accurate. Consider these steps:

  1. Explicitly cast all non-string columns in your SQL query.
  2. Verify the DBConnector timeout settings in Studio.
  3. Log the raw JDBC response via a debug snippet.
SELECT CAST(id AS VARCHAR(50)), CAST(name AS VARCHAR(255)) FROM users LIMIT 100