I am trying to ingest Date from a flat csv file to xDM database. The database is MSSQL.
I can use a hard coded case statement ie (case when 1 = 1 then 1 else 0 end ) but when I try to add a variable from the flat file it gives me an error ie ( case when Flat_file.record = 'ok' then 1 else 0 end ) it gives me an error
java.lang.ClassCastException: class net.sf.jsqlparser.expression.CaseExpression cannot be cast to class net.sf.jsqlparser.schema.Column (net.sf.jsqlparser.expression.CaseExpression and net.sf.jsqlparser.schema.Column are in unnamed module of loader com.indy.engine.core.module.classloader.StambiaClassLoaderRegistry$NamedURLClassLoader @7a79be86) at com.stambia.jdbc.driver.file.FileDriverStatement.verifySQLWithMetadata(FileDriverStatement.java:300) at com.stambia.jdbc.driver.file.FileDriverStatement.executeSelect(FileDriverStatement.java:468) at com.stambia.jdbc.driver.file.FileDriverStatement.executeStatement(FileDriverStatement.java:388) at com.stambia.jdbc.driver.file.FileDriverStatement.executeQuery(FileDriverStatement.java:512) at com.indy.engine.actionCodes.JdbcActionCodeI$1.initResultSet(JdbcActionCodeI.java:938) at com.indy.engine.manager.ActionCodeExecutor.executeDirectBindedCode(ActionCodeExecutor.java:374) at com.indy.engine.manager.ActionCodeExecutor.executeBindedCode(ActionCodeExecutor.java:551) at com.indy.engine.manager.ActionCodeExecutor.executeCode(ActionCodeExecutor.java:134) at com.indy.engine.manager.ActionCodeExecutor.run(ActionCodeExecutor.java:284) at java.base/java.lang.Thread.run(Thread.java:842)
Nathan. eckley
I am trying to ingest Date from a flat csv file to xDM database. The database is MSSQL.
I can use a hard coded case statement ie (case when 1 = 1 then 1 else 0 end ) but when I try to add a variable from the flat file it gives me an error ie ( case when Flat_file.record = 'ok' then 1 else 0 end ) it gives me an error
java.lang.ClassCastException: class net.sf.jsqlparser.expression.CaseExpression cannot be cast to class net.sf.jsqlparser.schema.Column (net.sf.jsqlparser.expression.CaseExpression and net.sf.jsqlparser.schema.Column are in unnamed module of loader com.indy.engine.core.module.classloader.StambiaClassLoaderRegistry$NamedURLClassLoader @7a79be86)
at com.stambia.jdbc.driver.file.FileDriverStatement.verifySQLWithMetadata(FileDriverStatement.java:300)
at com.stambia.jdbc.driver.file.FileDriverStatement.executeSelect(FileDriverStatement.java:468)
at com.stambia.jdbc.driver.file.FileDriverStatement.executeStatement(FileDriverStatement.java:388)
at com.stambia.jdbc.driver.file.FileDriverStatement.executeQuery(FileDriverStatement.java:512)
at com.indy.engine.actionCodes.JdbcActionCodeI$1.initResultSet(JdbcActionCodeI.java:938)
at com.indy.engine.manager.ActionCodeExecutor.executeDirectBindedCode(ActionCodeExecutor.java:374)
at com.indy.engine.manager.ActionCodeExecutor.executeBindedCode(ActionCodeExecutor.java:551)
at com.indy.engine.manager.ActionCodeExecutor.executeCode(ActionCodeExecutor.java:134)
at com.indy.engine.manager.ActionCodeExecutor.run(ActionCodeExecutor.java:284)
at java.base/java.lang.Thread.run(Thread.java:842)
Does anyone have a solution
Hello Nathan,
For this case, you can perform a SQL CASE statement direcrly.
You should use a stage between your file and the target table and perform the CASE SQL statement on the target table.
Audric FREY
Hello Nathan,
For this case, you can perform a SQL CASE statement direcrly.
You should use a stage between your file and the target table and perform the CASE SQL statement on the target table.
-
File external resolver with encrypted value
-
Timeout on Mapping/Webservice call
-
UNIQUE TEMP TABLE NAMES
-
Previous step name from a sub-process of execute delivery
-
Dropping multiple tables at once in XDI
-
Freeze Designer and corrupted workspace
-
FileWait/Move/Copy: FileInclude with space
-
Loop excel files
-
Change SVN user in the Designer
-
How to Specify the JVM used by the Designer?
See all 64 topics