Skip to main content
Solved

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

  • March 3, 2020
  • 4 replies
  • 125 views

kuanglee
Contributor
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).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • 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
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 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
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 3, 2020

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


kuanglee
Contributor
Forum|alt.badge.img+1
  • Author
  • 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.

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