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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantk19
Creator
Creator

Unable to update my target table which is used a source table

Hi,

 

I am trying to update 2 fields in my target table (Say table A) with the same Target table used as a source. Now i have just included only 3 fields from Source table (id, field 1, field2) and need to update field 1, field2 in my target table which actually has around 20 fields. basically, i want to patch the data for 2 fields later on after my table has been loaded. 

 

But when i run the job, it keeps running and doesnt even extract the data from source when source and target tables are the same. Action on Data is "Update" and i have defined id as key in my Talend job. The design is as below

 

Source Table(A)--->tmap---tlog--->Target Table(A). What could be possible issue?

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@sushantk19 , your job design should be like below 0683p000009Ma5T.pngwhen your source and target tables are same to update.

View solution in original post

18 Replies
manodwhb
Champion II
Champion II

@sushantk19 , your job design should be like below 0683p000009Ma5T.pngwhen your source and target tables are same to update.

sushantk19
Creator
Creator
Author

I am unable to locate tHash component. where do i find this?

manodwhb
Champion II
Champion II

@sushantk19, you need go to File>>Edite to project settings>>Designer>>palette settings>> Technical>>move those two component from left to right side and click OK0683p000009MZyx.png and you will find,

 

sushantk19
Creator
Creator
Author

ok.i can see them now. I will test my job and let you know the result.

manodwhb
Champion II
Champion II

@sushantk19, Okay.

 

sushantk19
Creator
Creator
Author

@manodwhb : in my target table i.e tDBoutput1 shall i include all the fields from  target table or just 3 fields i.e primary_key and 2 fields which i want to update?

manodwhb
Champion II
Champion II

@sushantk19 , Keep the filed which you want to update along with the primary key.

sushantk19
Creator
Creator
Author

The logic works perfectly fine when i try to update a flat file, but with same Redshift table as my target the query keeps running and doesn't commit.

 

I have defined one of the ID field as primary key at DB and ETL level and action on data as "update". I am testing initially with such a couple of records, but it is not working. What could be issue?

manodwhb
Champion II
Champion II

@sushantk19 , maybe you need to call commit separately after the tredshiftoutput.