Topic
1 reply Latest Post - ‏2013-12-30T01:24:31Z by DanSchallenkamp
John.A.Trevisan
John.A.Trevisan
1 Post
ACCEPTED ANSWER

Pinned topic DataStage 8.1 Change Capture question...

‏2013-12-09T17:42:08Z |

Hello, do the files in a change capture stage have to be identical in number of columns? I have the following situation...

before = FILE_A with columns COL_A, COL_B

after    = FILE_B with columns COL_A, COL_B, COL_C

I need to compare only columns COL_A, COL_B which are identical in both tables, but to simplify down stream processing would like COL_C from the after table to simply be passed along in the output. How do i exclude COL_C from the compare, but include it in the output?

Thanks

  • DanSchallenkamp
    DanSchallenkamp
    2 Posts
    ACCEPTED ANSWER

    Re: DataStage 8.1 Change Capture question...

    ‏2013-12-30T01:24:31Z  in response to John.A.Trevisan

    Yes, I believe you can do exactly what you describe.  Obviously one or more columns are designated as keys.  Both your Before and After input files must be sorted by these same keys.  I believe the Change Capture Stage also allows you to specify one or more additional input columns that will take place in the "compare".  In your case, I will assume COL_A is the key, you want to add a second input column, COL_B to the columns that are compared.  Then for all records from the Before and After files, if the key column matches, COL_B will also be checked to see if it matches too.  COL_C will not take part in the compare but will be included in the output, as directed by the Output columns that you specify.  I am describing this from memory so you should give it a try with two very simple input files and verify.

    Hope this is helpful.

    -dan