Question

Geodatabase Error (-2147219884): The Field already exists

  • 5 September 2016
  • 16 replies
  • 208 views

Badge +3

Not a question, but just an issue I thought worth sharing. When converting my data to a geodatabase, I kept getting the following error message: "Geodatabase Error (-2147219884): The Field already exists". Not a very helpful error message and googling this didn't help much.

It turned out that my sewer pipe input file had a field named 'shape', and geodatabases don't like that! Using the AttributeRenamer to change the field to 'shape1', everything then went tickety-boo!


16 replies

Userlevel 5

Good call, thanks for sharing. There is in fact a published list of reserved words for File Geodatabases, but interestingly enough SHAPE isn't among them. I think the problem is that FME defaults to using SHAPE for the geometry column name, although the column name can be pretty much anything, so it isn't reserved as such.

I think it would be nice if FME would take care of such naming collisions on its own, in some way.

Badge +3

Good call, thanks for sharing. There is in fact a published list of reserved words for File Geodatabases, but interestingly enough SHAPE isn't among them. I think the problem is that FME defaults to using SHAPE for the geometry column name, although the column name can be pretty much anything, so it isn't reserved as such.

I think it would be nice if FME would take care of such naming collisions on its own, in some way.

Just including the field name in the error message rather than "The Field already exists" would be the first step.

 

You're right about the list of reserved words, but it took me all morning to drill down that that was the cause of the problem. Hopefully next time, when somebody gets stuck at this error message, this post will save them a few grey hairs.

 

 

Userlevel 5
Just including the field name in the error message rather than "The Field already exists" would be the first step.

 

You're right about the list of reserved words, but it took me all morning to drill down that that was the cause of the problem. Hopefully next time, when somebody gets stuck at this error message, this post will save them a few grey hairs.

 

 

I couldn't agree more. But I suspect that the error message comes from ArcObjects and not from FME. Someone from Safe will have to chime in.
Userlevel 4
Badge +25

I think the issue is that, yes - by default the "Shape Field" is called SHAPE. So the "field already exists" is likely because only one of those SHAPE fields can be created before the other is a duplicate.

If I rename the Shape Field to Shape99 (for example) then a field called Shape99 has the same issue.

So you could change the field (under the Format Parameters tab), but I will also file a request to our developers to improve the result. For one, it would be useful if we could state which field already exists. It might be that the message cannot be controlled by us, but I can ask.

Userlevel 4
Badge +25

I think the issue is that, yes - by default the "Shape Field" is called SHAPE. So the "field already exists" is likely because only one of those SHAPE fields can be created before the other is a duplicate.

If I rename the Shape Field to Shape99 (for example) then a field called Shape99 has the same issue.

So you could change the field (under the Format Parameters tab), but I will also file a request to our developers to improve the result. For one, it would be useful if we could state which field already exists. It might be that the message cannot be controlled by us, but I can ask.

PR#72098

 

 

Badge

Hi Arnold,

Thanks for sharing. I have been getting same error in log file "Geodatabase Error (-2147219884): The Field already exists". FileGDB Writer: Could not create feature class 'Roads'

It helped me in resolving similar kind of issue i have been encountering since 2 days. My source file is shape and target is FileGDB. The fieldname OBJECTID is from source shapefile. This may be added to source shapefile by exporting FC from filegdb or personalgdb. Even though OBJECTID field is not available in Reserved words list of page shared by David, its worth adding OBJECTID also to the page containing reserved words list or to appropriate page of FME documentation.

I have discarded OBJECTID field and it worked.

 

If FME team improves generic error messaging with reasonable error guidance, that saves considerable time of users.

Thanks,

KHK.

Badge +3

Hi Arnold,

Thanks for sharing. I have been getting same error in log file "Geodatabase Error (-2147219884): The Field already exists". FileGDB Writer: Could not create feature class 'Roads'

It helped me in resolving similar kind of issue i have been encountering since 2 days. My source file is shape and target is FileGDB. The fieldname OBJECTID is from source shapefile. This may be added to source shapefile by exporting FC from filegdb or personalgdb. Even though OBJECTID field is not available in Reserved words list of page shared by David, its worth adding OBJECTID also to the page containing reserved words list or to appropriate page of FME documentation.

I have discarded OBJECTID field and it worked.

 

If FME team improves generic error messaging with reasonable error guidance, that saves considerable time of users.

Thanks,

KHK.

@khk, @david_r: Rather than it being a reserved word, it's (as @Mark2AtSafe mentions) probably a conflict with your File Geodatabase Format Parameters:
Badge
@khk, @david_r: Rather than it being a reserved word, it's (as @Mark2AtSafe mentions) probably a conflict with your File Geodatabase Format Parameters:
Hi Arnold,

 

 

Thanks for visual. I dont know about this config.

 

 

Badge

Seemed to avoid the issue using FeatureWriter rather than Writer

I believe this issue comes up if there are fgdb reserved names being used within the translation that do not align with the fgdb reserved names of the writer and vice versa. I used Attribute manager to change GlobalID (From Reader) to GLOBALID (in writer) to fix the error. The same may go for Shape to SHAPE or ObjectID to OBJECTID, etc.

Badge

I have the very same issue with an ARCGISPORTALFEATURES writer.

The hosted feature layer has been created from ArcGIS Pro and I am adding to a Workbench to update it.

I keep getting this error. I tried removing objectid attribute or shape.len before writing to it but it keeps failing.

Any idea ?

 

Thanks

Userlevel 1
Badge +11

I have the very same issue with an ARCGISPORTALFEATURES writer.

The hosted feature layer has been created from ArcGIS Pro and I am adding to a Workbench to update it.

I keep getting this error. I tried removing objectid attribute or shape.len before writing to it but it keeps failing.

Any idea ?

 

Thanks

Hi @biboba,

I see the original question here is from quite a few years ago. Would you be open to posting a new question for better visibility?

The error message is somewhat generic so your issue may be a bit different from this one. Posting a new question will make it easier for the Community to get the gist quickly and provide you with more answers. If you're able to attach a full log as well that will provide more information on your issue. Thanks!

Badge +3

I have the very same issue with an ARCGISPORTALFEATURES writer.

The hosted feature layer has been created from ArcGIS Pro and I am adding to a Workbench to update it.

I keep getting this error. I tried removing objectid attribute or shape.len before writing to it but it keeps failing.

Any idea ?

 

Thanks

@biboba: I agree with @jovitaatsafe: better post a new question.

 

At the same time, I suggest you play around with the BulkAttributeRenamer, and by the process of elimination find out which of your attribute names is causing the error message.

I have the very same issue with an ARCGISPORTALFEATURES writer.

The hosted feature layer has been created from ArcGIS Pro and I am adding to a Workbench to update it.

I keep getting this error. I tried removing objectid attribute or shape.len before writing to it but it keeps failing.

Any idea ?

 

Thanks

I just ran into this error. When I remove the existing attribute "objectid", the error is gone.

Badge +3

I ran into the same error message. Changing the attribute definition from Automatic to Manual or Dynamic worked for me.

Badge +1

Not a question, but just an issue I thought worth sharing. When converting my data to a geodatabase, I kept getting the following error message: "Geodatabase Error (-2147219884): The Field already exists". Not a very helpful error message and googling this didn't help much.

It turned out that my sewer pipe input file had a field named 'shape', and geodatabases don't like that! Using the AttributeRenamer to change the field to 'shape1', everything then went tickety-boo!

Late to the party, but leaving this here in case someone else runs into the same issue. I was getting the same error message and I tried changing OBJECTID, SHAPE, etc. After trying to write to fgdb with the same dataset, I got another error that indicated I had two fields with duplicate names only differing in case:

 

This fixed the issue.

Reply