Forum Discussion

subhash_a_chand's avatar
subhash_a_chand
New Contributor
4 years ago

Need Help to convert from XML to CSV

Hello Team,
I need to convert some xml file to csv or we have to map it flattern. I am not able to verify the xml docs in order to proceed further, I have attached the xml file.
Can anyone please help me here and provide me the sample pipeline for same.
AllScripts.txt (131.5 KB)

  • Siva_Venna's avatar
    Siva_Venna
    Contributor

    Using mapper to drop fields is fine. I am asking is it possible to truncate the table before inserting data?. i.e table will have only latest execution data

    • pedro_almeida's avatar
      pedro_almeida
      New Contributor

      As I see it, you have 2 options:

      1. Add an “Oracle Delete” Snap without any delete condition (DELETE FROM TableName) before inserting the data.
      2. If you really need to execute the Truncate instead of the Delete, you may try to create a stored procedure (On your Oracle DB) with “EXECUTE IMMEDIATE 'TRUNCATE TABLE ’ || TableName;” statement and then call this stored procedure on SnapLogic with the “Oracle Stored Procedure” Snap.

      I would go for option 1 for simplicity.

      • Siva_Venna's avatar
        Siva_Venna
        Contributor

        Thanks pedro.almeida, it worked :+1: