Skip to main content
Solved

SQL to Run After Writer in both SQL Spatial (JDBC) and SQL Non-Spatial writers


kuanglee
Participant
Forum|alt.badge.img+1

I have 2 dynamic writers in which data are coming from 2 readers (SQL Spatial and SQL non-spatial, respectively). Actually the readers are reading from the same database (A, for example) and the writers are writing out to the same database (B, for example). The reason why I have 2 readers is because there are spatial data and non-spatial tables in database A.

I have a SQL script that can set ObjectID to Primary Key. It doesn't seem working properly when I put SQL script into the first writer (spatial). Therefore I had to put this SQL script into the second writer (non-spatial) to make it run properly.

 

Any ideas? Thanks

 

Best answer by kuanglee

Thanks for your suggestions. It turned out that I don't need this FME_SQL_DELIMITER $ in the JDBC writer's SQL Editor (SQL To Run After Write).

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

4 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • March 3, 2020

Another option is replacing the writers by FeatureWriter transformers.

Then you have the option to use a SQLExecutor transformer after the FeatureWriter is done.

Hope this helps.


kuanglee
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • Best Answer
  • March 3, 2020

Thanks for your suggestions. It turned out that I don't need this FME_SQL_DELIMITER $ in the JDBC writer's SQL Editor (SQL To Run After Write).


kuanglee
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • March 3, 2020

Thanks for your suggestions. It turned out that I don't need this FME_SQL_DELIMITER $ in the JDBC writer.


kuanglee
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • March 3, 2020
erik_jan wrote:

Another option is replacing the writers by FeatureWriter transformers.

Then you have the option to use a SQLExecutor transformer after the FeatureWriter is done.

Hope this helps.

Thanks for your suggestions. It turned out that I don't need this FME_SQL_DELIMITER $ in the JDBC writer.


Reply


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