02-11-2019 05:29 AM
Hi,
i’m getting following error when executing “Generic Jdbc insert” snap.
i have 2 data values that need to be inserted in 2 column table.
mapper gives me col1, col2 each having list of 3 values.
col1 = [a,b,c] and col2 = [{…},{…},{…}]
Unable to construct CREATE TABLE statement
Resolution:
Please provide valid input data.
Reason:
No column value or value of supported column type in the input view
Hide Details…
com.snaplogic.snap.api.SnapDataException: Unable to construct CREATE TABLE statement
Thanks,
Kiran
02-11-2019 05:31 AM
02-11-2019 01:23 PM
Hello Kiran, Could you share the output of the XML formatter as well as a screenshot of the mapper? Most likely, you’d need to use the JSON Splitter snap after to ‘flatten’ the data to fit into a relational database. Thanks!
02-11-2019 06:15 PM
Hi Vish,
Basically I would need the XML go into the database. At XML Formatter snap I can see the output of 3 xml data elements. when I use file writer snap next to XMLformatter, I can create an xml file with complete xml data.
3 elements → should go as 3 rows in a table
eg:
id=1, data=doc1
id=2, data=doc2
id=3, data=doc3
how would i connect xmlformatter to jdbcinsert for each data in xml?
Thanks,
Kiran