top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to insert type when join 2 table with scd informatica

+2 votes
236 views

I have 2 source tables:

table A: table B:

A_id || A_code           B_id || B_code 
-----  -------           -----  ------- 
2          t2            1      t1
3          t3            2      t2
4          t4            3      t3 

I want to join 2 table use Slowly change dimension

target table:

tgt_id || tgt_code || is_table A || is_table B
-----  ------------   -----------   ----------- 
1          t1         0              x 
2          t2         x              x   
3          t3         x              x
4          t4         x              0

I can't check type 'is_table A ' and 'is_table B' when join table.

posted Jun 9, 2014 by Sunil

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

If I understand correctly, you need to do a full outer join (in SQ or Joiner) on A_id=B_id. Then you can derive the target fields in an expression transformation by doing some null checking as follows:

tgt_id: IIF(ISNULL(A_id),B_id, A_id)

tgt_code: IIF(ISNULL(A_code), B_code, A_code)

is_table_A: IIF(ISNULL(A_id),'0','x')

is_table_B: IIF(ISULL(B_id), '0', 'x')
answer Jun 10, 2014 by Shweta Singh
Similar Questions
0 votes

I tried the SQ and linked directly from source to SQ only the required columns and generated workflow but it shows no result. Do I have to use any other transformation or do I have to add query in SQ if so how? help me thanks in advance.

0 votes

Can anyone of you please elaborate on how to map the informatica for the inserts and updates to the target from source table?

I appreciate it, if you explain with example.

...