Skip to main content
Solved

How to update state machine


Hi there,

I'm copying a table to other table in different oracle database. When the copy finishes, I need update a state field in source table (reader). How a reader could be transformed to a writer?

Best answer by mark2atsafe

As @david_r says, you could use a FeatureWriter transformer instead of a writer, then - as @arnovananrooij mentions - add a SQLExecutor to carry out an update.

The other solution is to use the writer parameter called SQL to Run After Write. You can put your SQL in there and it will run after the writer is complete.

To be honest, the FeatureWriter/SQLExecutor is a better way, because if the writer fails for some reason, you can choose not to run the SQL, but can alert an administrator instead (say with an Emailer transformer).

View original
Did this help you find an answer to your question?

2 replies

arnovananrooij
Contributor
Forum|alt.badge.img+5

You could use a sqlexecuter transformer to execute statements on any database


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • Best Answer
  • January 14, 2019

As @david_r says, you could use a FeatureWriter transformer instead of a writer, then - as @arnovananrooij mentions - add a SQLExecutor to carry out an update.

The other solution is to use the writer parameter called SQL to Run After Write. You can put your SQL in there and it will run after the writer is complete.

To be honest, the FeatureWriter/SQLExecutor is a better way, because if the writer fails for some reason, you can choose not to run the SQL, but can alert an administrator instead (say with an Emailer transformer).


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings