cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table comparison Issue

Former Member
0 Likes
668

Hi all,

   Created job using table comparison transform. I compared source with target on record_id field .Rows that doesn't matched on record_id should insert in target table,this is my requirement. But in target all data from source getting inserted into target. can you suggest me how solve this issue.

Table comparison options:

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Make sure you are choosing a right target table in table comparison transform.

Also please remove record_id from compare column box.

Rest all the setting looks correct.


Try & let me know.

Thanks

Swapnil

Former Member
0 Likes

   I used the same target that I am using in comparison table and one more thing   in target table options I enabled delete data from table before loading ,That's why I am facing error?

former_member187605
Active Contributor
0 Likes

Sure, your table is truncated before the data flow is started. All your input records will be new, when comparing to an empty table.

Just uncheck that option. Ignore all other answers to your post, your data flow logic is perfectly valid.

Answers (5)

Answers (5)

Former Member
0 Likes

Vineela

I guess your table is truncate & loading so Uncheck the target table option Delete Data From Table Before Loading

Former Member
0 Likes

Thank you all

Former Member
0 Likes

I think you have not defined the record id as primary key. Define record Id as primarykey in the target

Former Member
0 Likes

     I didn't defined record_id as primary key and in query I just used order by on record_id column.

Former Member
0 Likes

Vineela,

Dont get confused. Just uncheck the delete data from table before loading option in the Target table. Also you can add other compare columns which might get changed during the upsert operations


Regards

Arun Sasi

Former Member
0 Likes

Post your query transform screenshot

Former Member
0 Likes

Specify generated key column. Then give the Input primary key columns and list all the columns in 'Compare Column' you want to compare against.