07-05-2017 02:00 PM
We have an Oracle table that we’re trying to use an Execute snap on. The column names contain $ (t$field is the actual name), which seems to be throwing it off. I’ve tried the following ways, but the snap continues to look for an object, rather than treating it as a string. Is there another way I could try this out?
With the expression toggle enabled:
'SELECT table.t$field FROM owner.tableName table'
'SELECT table.t\$field FROM owner.tableName table'
'SELECT table.t\\$field FROM owner.tableName table'
'SELECT table.t\$$field FROM owner.tableName table'
'SELECT table.t$$field FROM owner.tableName table'
'SELECT table.' + $['T$FIELD'] + ' FROM owner.tableName table'
With the expression toggle disabled:
SELECT table.t$field FROM owner.tableName table
SELECT table.t\$field FROM owner.tableName table
SELECT table.t\\$field FROM owner.tableName table
I keep getting the same error on the snap:
om.snaplogic.jsonpath.UnexpectedTypeException: Expecting object for JSON-Path field reference ‘field’, found: null
Does it just not support having $ in the field names? Anyone know of the proper way to do this or a workaround?
Thanks in advance
07-05-2017 03:08 PM
If your Oracle table has columns whose names contain a ‘$’ (or any other special character) in it, here’s how the execute query needs to look like:
Query: select “USER$ID” from testtable1
Note: Expression should not be enabled on the “Oracle Execute” snap
07-06-2017 05:03 AM
Thank you! That did the trick.