Solved

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

  • 3 March 2020
  • 4 replies
  • 14 views

Badge

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

 

icon

Best answer by kuanglee 3 March 2020, 23:20

View original

4 replies

Userlevel 2
Badge +16

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.

Badge

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

Badge

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

Badge

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