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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Updating records in a table from another table usindg talend

hello all
i am having two tables tab1 and tab2 which are replicate of each other.there are no keys in it .
i update column in tab1 through database and run the job then in tab2 it is not getting updated.
job flow is
toracleinput1>>>tmap>>>toracleoutput1
if i enable traces debug option i am able to see updated row on the output link getting fetched but in database it is not updated.
the newvalue field is having 48 as updated value ,in talend it is geeting fetched but when i check in db it is the same old value...ignore the error sign on toracleoutput..it is some other reason
thanks....

Labels (2)
17 Replies
Anonymous
Not applicable
Author

Everything is ok, but where is the incoming data for your key column. Your tMap doesnot show any incoming records for your key column.
Connect row1.id to id in tmap output.
Thanks
Vaibhav
Anonymous
Not applicable
Author

Thanks for your reply.
Even I tried this earlier, but in that case all other column values are overwritten and in DB I find null instead of the old values.
Anonymous
Not applicable
Author

I just want an alternative for this query: -
UPDATE transaction_bak
SET 
fl_t_order = tt.t_order
FROM trans_temp tt
WHERE ( transaction_bak.id = tt.id )
But I don't know how to do this exactly in talend.
Anonymous
Not applicable
Author

Please refer to tMap documentation and examples, you will get an idea.
http://www.talendforge.org/tutorials/tutorial.php?idTuto=9
You will have to add lookup table (trans_temp) to tMap and use InnerJoin and join on id for both tables at input side.
Thanks
Vaibhav
Anonymous
Not applicable
Author

Yup it worked, thanks a lot Vaibhav San 0683p000009MACn.png  
But this is quite strange in talend, even if you want to update a couple of columns out of a hundred odd, you still need to map all the columns and which are not mapped will be updated as null.
Anonymous
Not applicable
Author

In update query, when there is no "where clause or join condition", then it updates all the records as per the input data. In your case input for all the column is null. That's why it is updating Null... Talend is no more than what we ask him to do. We need to understand properly what we are doing, then things will be as per our expectations.
Thanks
Vaibhav
_AnonymousUser
Specialist III
Specialist III

Hello,
I am migrating data from mysql to postgresql database. I have 600 columns in mysql table A.I want to move these values to postgresql table A.Due to the java limit of a method can have at max 65535 bytes its giving error if i do this task in one job ,So I have split the job into two subjobs. First job inserts or updates first 300 columns and Second job updates next 300 columns. But its not working as expected. Its able to insert or update first 300 columns but when the second job finishes its going to overwrite the first 300 column as null.
Is it not possible to update only selected column out of this 600 columns in talend?
modara
Creator
Creator

@​sanvaibhav,

I have same issue facing last few days but havent get any help

​i just want to take on table from online to offline n dont wana use tmap. I have primary key assigned. When even i click run it takes all rows not just changes or newly input rows. I put Action on table as default n action on data as insert and update

Do i have to use tmap. Coz i dont have any other table to map with. Pls suggest

Thanks​