Forum Discussion

Siva_Venna's avatar
Siva_Venna
Contributor
6 years ago

Dynamic table structure

I used following snaps to extract data from SQL server and load it data into Oracle database.The requirement is that the no. of columns in the source table keep changes, what settings to be done in mapper snap to handle the dynamic column no. change?
Please suggest if this can be done by using any other snaps too.

7 Replies

  • luk4rahul's avatar
    luk4rahul
    New Contributor

    Thanks @bojanvelevski ! I tried the splitter and have moved a little ahead. But one more challenge is that I have to run Selects and Updates one after the other from the JSON. What I mean here is for e.g.
    Customer Age : Select a,b from table1;
    Stage_table_update_for_age: Update stagetable set age=a (value ‘a’ from above select) where list of conditions.

    Customer Sex : Select c,d from table1;
    Stage_table_update_for_sex: Update stagetable set sex=c (value ‘c’ from above select) where list of conditions.

    There are multiple such selects and updates to be done one after the other irrespective of how many I have. I am not sure what snaps to use for this type of handling.

    I am able to get the inputs from the JSON in format above but how can we segregate the selects with the exact update it needs ?

    so my mapper has the outputs as listed in the diagram attached. I want to make sure I send these to SQL execute in the same manner as selects and updates for those selects.

    Here it shows 3 for Age, Gender and Quantity. But it can be any number of such statements maybe 6 or 8 based on my framework. So should be scalable too.

    I tried to attach a pic of the JSON how it looks but I dint find any attachment related button.