Question

WFS write to PostGIS result failed to open in ArcGIS. Error: The field is not nullable

  • 27 April 2020
  • 1 reply
  • 5 views

Hi,

I'm a bit new to FME so pardon me if the question is basic:

I use FME Workbench 2018.1.

I have a PostGIS table with 1035 polygon features which needs to be updated (Table A). The update source is a WFS layer with 27 polygon features, among which 26 are updated features and 1 new feature to be added to Table A.

The workflow is as follows:

1. Since the WFS has a different schema to Table A, I use AttributeManager to make the WFS attribute table consistent with Table A.

2. I use Tester to filter out the 1009 features that don't need to be updated.

3. I write the filtered 1009 features and the 27 updated/new features from WFS to Table A, hoping to get an updated layer with 1036 features. I have the following feature type settings:

-Table A has a column 'gdb_geomattr_data' which seems to store geometry, so I set the Spatial Column of the writer as 'gdb_geomattr_data'

-Table definition set to 'Automatic'

-Create Generic Spatial Columns: No

-Bulk Insert: No

-Table name: Table A

-Geometry: postgis_geometry

-Feature Operation: Insert

-Table Handling: Drop and Create

Unfortunately, although the translation succeeded and looks all good in Inspector, when I tried to load the layer in ArcGIS, an error popped up: 'Error opening feature class. The field is not nullable.'

Anyone know what that means and where went wrong?

 

Thanks a million.


1 reply

Userlevel 4
Badge +26

OK, so looks like there is a field getting created which ESRI doesn't like (https://support.esri.com/en/technical-article/000010006 )

 

 

Have you been able to inspect the PostGIS table in FME with a PostGIS reader? Does it look ok?

 

 

The thing is, in your workflow you are Dropping and Recreating the table which means the schema definition of the table could be different. The better option would be to create a table which works and then use the 'Truncate' option instead, This will keep the schema definition of your PostGIS table the same as before and should hopefully avoid the issue.

 

 

Hope this helps

Good Luck!

 

 

 

Reply