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

Hi
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
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Highlighted
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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

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

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download