Running multiple SQL statements from a JSON file
I am new to Snaplogic and seek advise from the experts here.
I have a JSON file which has array sections for
Truncate,
Insert ,
Update and
Select Update (where I have to select from one table and use the selected values to update in another staging table with the derived values from select).
Each above section of array can have multiple truncate or insert or update statements and will change as per the JSON which it selects.
I mean the JSON is a dynamic JSON for a framework I am designing so the number of SQL statements can be dynamic too.
I am using the JSON parser etc…and everything is going fine till then. But when I try to run these sqls in sequential manner meaning
1)Truncate (using child pipeline)
2) Insert (using another child pipeline)
The statements are split in array fashion like objects and not like strings. So when we pass these statements to Oracle Execute, it doesn’t understand that it needs to run it as a SQL string and not an array object.
the output of the array is going as :
“truncate_sql”:
[
“TRUNCATE TABLE ABC”
“TRUNCATE TABLE BCD”
]
How can I run these sequentially in an Oracle execute ?