Update single column in oracle

Four Stars

Update single column in oracle

We're trying to update a single column in a table, using a context variable. All rows in the table should be updated. The equivalent sql would be "update our_table set col="+context.MYVAR.
I can't make this work using tFixedFlowInput or directly from tJavaRow piped into an OracleOutput component. I am told the schemas do not match.
I have selected the "Field Options' in the output table and just selected the one column to update. I am either get the schemas error or a Select error.

Any suggestions would be welcome.
Community Manager

Re: Update single column in oracle

For update, you have to set one column as a key on the schema of tOracleOutput, there should at least two columns on the schema. You just want to update a single column, you can use tOracleRow to execute a query.
"update our_table set col="+context.MYVAR

Best regards
Talend | Data Agility for Modern Business
Four Stars

Re: Update single column in oracle

Hi, thank you. Yes, I can do this with straight sql but was exploring if/how I could use the GUI.
I got this to work using your suggestion, but the execution is very slow, I think because it is doing the join. In this case, I just need to update all rows so a join wouldn't normally be needed.
Is there a way I can do this using the tELT components? One possible problem -- are the context variable available in the ELT components, or is there a way I could pass them in?
Thank you.

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend


Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now