Skip to main content
Solved

AddCodedValueToDomain - Possible with FME?

  • February 3, 2016
  • 3 replies
  • 27 views

sdepriest
Contributor
Forum|alt.badge.img+9

I've been asked to see if its possible to maintain values in a coded domain on an ESRI Geodatabase. I would need to insert, update, and delete code/description combination records in the domain. I've found this article:

https://knowledge.safe.com/articles/886/working-wi...

but it's referring to updating a table that uses a domain, not the actual domain.

I know FME can call a python script like this from within FME...

arcpy.AddCodedValueToDomain_management(in_workspace="H:/MyDocs/geodbs/inspections/Inspections.gdb",domain_name="Structure_No",code="ABC-123",code_description="STRUCTURE 123")

But can FME do it directly?

Thanks,

Sarah

Best answer by fmelizard

We highly recommend that you use ArcGIS in order to create/define/alter your geodatabase domain definitions. But you can get at the domain definitions by reading in a geodatabase feature class that contains the domains you wish to alter using a FeatureReader. This would give you access to the underlying schema of the geodatabase where you could then try to make adjustments to domain definitions.

The syntax you would look for within the schema looks like this - coded_domain(<DomainName>:<DataType>:code:value:code:value:.....).

An example domain for street types might look like this - coded_domain(StreetType:char:A:Arterial:S:Secondary:R:Residential)

Again, this is not necessarily a technique we recommend given the complex nature of domains.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • February 3, 2016

I guess I asked this question in the old Google Discussion Group, FMETalk.

https://groups.google.com/forum/#!topic/fmetalk/KTO4vfQvT6k

Any updated information since then? Any new capabilities in FME 2015 or 2016?


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • February 3, 2016

We highly recommend that you use ArcGIS in order to create/define/alter your geodatabase domain definitions. But you can get at the domain definitions by reading in a geodatabase feature class that contains the domains you wish to alter using a FeatureReader. This would give you access to the underlying schema of the geodatabase where you could then try to make adjustments to domain definitions.

The syntax you would look for within the schema looks like this - coded_domain(<DomainName>:<DataType>:code:value:code:value:.....).

An example domain for street types might look like this - coded_domain(StreetType:char:A:Arterial:S:Secondary:R:Residential)

Again, this is not necessarily a technique we recommend given the complex nature of domains.


sdepriest
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • February 4, 2016

Thank you @HeatherAtSafe, I understand the recommendation. I don't particularly want to risk corruption to our geodatabase, so I will explain this to the requestor.

Sarah