Data Replication 2
Results 1 to 5 of 5

Thread: Placement of new columns

  1. #1
    chetan86 is offline Junior Member
    Join Date
    Nov 2016
    Posts
    19
    Rep Power
    0

    Placement of new columns

    Hi Experts,

    I am trying to add a column with system date for the target tables. The problem I am facing is that this new column is coming at the end of all the table columns.
    Is there any way I can keep this new column at the beginning? I could not find any option to change the order of the columns. Your help would be highly appreciated.

  2. #2
    stevenguyen is offline Senior Member
    Join Date
    May 2014
    Posts
    301
    Rep Power
    6
    Sorry, there is no way to set the Column order.


    As Replicate works by column name (i.e., uses the column name in the SQL it runs) it should not matter to Replicate what the column order is.


    Note that if Replicate creates the target table then the order will be the order of the columns in the output side of the transform screen (under table settings). Since added columns are added to the end of the current list (when added) they would show up after all the columns in the source - again assuming that Replicate creates the target table.


    Thanks,
    Steve

  3. #3
    chetan86 is offline Junior Member
    Join Date
    Nov 2016
    Posts
    19
    Rep Power
    0
    Hi Steve,

    Thanks a lot for your quick response.
    Do you have any workaround in mind to achieve the same thing? If not from Replicate, then can we do it using some other way?

  4. #4
    Hein is offline Senior Member
    Join Date
    Dec 2007
    Location
    Nashua, NH - USA.
    Posts
    163
    Rep Power
    12

    pre-create, and truncate on full-load.

    1) Let Replicate create the target table(s)
    - check out the Advanced-Run options 4 & 5 : Create (missing) Tables and Stop.

    2) Alter the target table to place the added (Date) columns anywhere you like.
    - this likely involves exporting a create script, edit, drop table, run create script

    3) Be sure to check/set the full-load options to 'TRUNCATE ON RELOAD' not DROP & CREATE.

    4) Run the task for real.

    5) Realize that column ordering should really just be a creature feature, convenience element.
    - No proper application code should rely on 'select *' - but that religious discussion is probably best continued in a bar.

    Cheers,
    Hein

  5. #5
    chetan86 is offline Junior Member
    Join Date
    Nov 2016
    Posts
    19
    Rep Power
    0
    Hi Hein,

    Thanks a lot for our response. The workaround you has suggested is working fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •