CXone Studio DBConnector: SQL syntax error on parameterized query

Trying to run a parameterized SQL query in a CXone Studio script using the DBConnector action. The query looks like SELECT * FROM customers WHERE id = ${session.customerId}. Getting a 400 Bad Request with Invalid SQL syntax. The platform seems to be stripping the parameter or expecting a different format for the input mapping. Has anyone got this working with dynamic session variables?