Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
veeaar
Contributor
Contributor

Issue with updating selected records in Postgres target

Hi All,

I am new to talend and facing issues while trying to implement the logic below.

I need to translate a legacy data from oracle to postgres and below is the sample structure of the postgres target table.

tableseq(db sequence) casenumber legacynumber statusofcase

1 123 789 A

2 123 678 B

3 123 456 C

i have created various filters in the tmap component to insert the data in above format.

But for update scenarios i have taken my key as casenumber but i want to update the status of the record where the legacynumber is 456.

i cant take the legacynumber as key because a part of this update i will also need to update the legacynumber column to the some new number like 100.

basically i m trying to acheive below SQL functionality in talend.

update tableA set legacynumber=100 where legacynumber=456 and casenumber=123;

any inputs will be highly appreciated as i ran out of the options and needs the resolution ASAP.

Regards,

Veearr

Labels (2)
4 Replies
Anonymous
Not applicable

Hello,

Do you use any filter in tMap component? Could you please post your tMap screenshots here? Which will be helpful for get more information from situation.

Best regards

Sabrina

gjeremy1617088143

Hi, in TMAP update output set a filter expression on the output expression filter field :

your_row.legacynumber == 456 && your_row.casenumber=123

Send me Love and Kudos

veeaar
Contributor
Contributor
Author

yes i have filter on the tmap to filter the records to insert or update flow.

veeaar
Contributor
Contributor
Author

i thought applying output filter will filter the incoming records flow to the target.

 

in the incoming records i have case number 123 and legacynumber 100 and in the prev legacy number 456.but where can i mention to filter the target dataset for legacy number 456?

 

if i apply your_row.legacynumber == 456 && your_row.casenumber=123 this will only filter the data that goes into target but it wnt restrict the update to 456 legacy number.

 

Please correct my understanding.