Forum Discussion

Ajay_Chawda's avatar
Ajay_Chawda
Contributor
7 years ago

Populate Records

Hi All,
Need some suggestion for below implementation ,

Can someone help me with ideas or suggestions?

thanks in advance

5 Replies

  • You can do the following. I have written it using SQL for ease of representation , but you can transform them into Snaps

    SELECT Account_Summary, ID, Concatenated_ID, Cost_Center_ID, Company_ID, Location_ID, Business_Unit_ID, year, unpivot1.amount
    FROM input2,
    (SELECT tax000 FROM input1
    UNION ALL
    SELECT tax100 FROM input1
    UNION ALL
    SELECT tax020 FROM input1
    UNION ALL
    SELECT tax030 FROM input1) unpivot1 (amount)

    I have attached a sample pipeline image that indicates how the above SQL can be translated into Snaps. The FileReader through FileReader3 Snaps are doing the reads from the input2 table and the FileReader4 snap is doing the read from the input1 table.

    Hope this helps.

    • Ajay_Chawda's avatar
      Ajay_Chawda
      Contributor

      Hi @psathyanarayan can you share pipeline also i need to populate business unit id as 000,10,20,30 for each records.
      first records will be tax000 amount and business unit ID 000 and input 2 details ,
      second records will be tax100 amount and business unit id 100 and input 2 details .
      like that for third and fourth recods.

      • Ajay_Chawda's avatar
        Ajay_Chawda
        Contributor

        Hi @psathyanarayan Attaching screen shot for more clear requirement
        input 1

        input 2

        expected results for 1st record in input 2

        similarly we should get for other records in input 2
        each records from input 1 should get multiple with each records in input 2