Skip to main content
Hi,

 

 

I am using the SQL Executor transformer followed by Counter transformer to create unique IDs for new features that I am adding to an existing Oracle table.

 

 

The SQL Executor transformer fetches the maximum ID number in the existing table, and then the Counter transformer adds 1 to it.

 

 

However when I run the workbench the new features in the Oracle table have a geometry of NULL and in the FME log it says "Spatial Column 'GEOM' is NULL. Geometry will be updated to NULL."

 

 

I am wondering if it is something to do with the settings in the "combine attributes" or "combine geometry" options in the SQL Transformer. But I have tried a number of combinations of settings and cannot get it to work.  I only have the "Result" section of the SQL Executor transformer linked to the "Counter" if this is also part of the problem...

 

 

Does anyone have any ideas?
Hi,

 

 

I suspect you're on the right track about the "combine" settings. It should work if you set it up like this:

 

 

 

 

Tip: consider using an oracle sequence rather than the SELECT MAX(...) and Counter idiom. It is more robust and possibly also quicker.

 

 

David
Hi David, 

 

 

Thanks for your reply.  Did you post a screen grab into your response with the set-up? If so, I can't see it due to browser issues.  Are you able to describe the set-up in words?

 

 

Thanks,
Hi,

 

 

try passing your features through one or two GeometryValidators.

 

 

David
Hi David,

 

 

I tried that but it came up with no errors.  I ended up just using a Sequencer and Trigger in Oracle instead..  Still not sure what was wrong with the FME workbench though. Thanks,

Reply