GDB: Warning when using reserved words

Related products: FME Form

When writing an Esri Geodatabase you should not use certain reserved words like "Select", "Delete" or "Update". For the complete lists per gdb version see FAQ: What are the reserved words for Esri's file geodatabase?

Everything works fine on the workbench side of things. Even ArcMap displays the geometry correctly. Only when you open the attribute table (or do any other query related action) you will get an error like:

"Could not load data from the data source. If you can correct the problem, press the refresh button to reload data. Possible problems can include bad network connection, invalid field, etc.
An invalid SQL statement was used.
An invalid SQL statement was used [Created]
An invalid SQL statement was used. [SELECT OBJECTID,Update FROM Created WHERE OBJECTID in (1)]"

It would be nice if workbench logged a warning when someone tries to write a reserved word as a column. Not sure how hard to implement (and maintain :-s).

That is a very good idea!

This is not only true for an ESRI geodatabase but more generally.

I had the same problem, but with a PostgreSQL database. And the column name should be 'alter', but that later resulted in errors, because it is an reserved word.


In fact this is very good idea. I had similar error which consumed my good couple of hours to figure out what caused the issue. I had the data with field name "from" there was no issues on writing to geodatabase table using "Esri Geodatabase (File Geodb)" Writer. Once the data is written got this error:

'

While debugging, used "Esri Geodatabase (File Geodb Open API)" writer, API was smart enough to truncate the field name to "from00". It would be really good if "Esri Geodatabase (File Geodb)" is also smart enough to truncate the field name for all the reserved word as field name or even better if it flags out that SQL reserve word was being used.