Select to view content in your preferred language

File Geodatabase views should support domains

1843
15
07-27-2023 01:27 PM
Status: Open
Labels (1)
AJR
by
Frequent Contributor

File geodatabases now support views (which is great), but the views can't have domains applied to them (this should be fixed).  If I have a view that pulls out a subset of data from a table and that table has domains applied to it, I should be able to apply those same domains to the file geodatabase view of the data subset, but this can't be done.  It makes (some) sense that views aren't editable, but since they are registered with the geodatabase I can't think of any reason why allowing domains to be applied to them shouldn't be possible.

15 Comments
Bud
by

@SSWoodward 

ArcGIS Pro 3.3.1

To my surprise, I was able to reproduce your results.

Questions:

  1. This behavior is inconsistent with enterprise geodatabases and mobile geodatabases. With eGBDs and mGDBs, we need to register the view with the geodatabase and use the Assign Domain to Field geoprocessing tool. But with fGDBs, that's not needed; the domain is applied automatically when an unregistered view is created. Why are the different types of geodatabases inconsistent? Is that a bug?
    Edit: Esri Support Case 03702311 - Database views and domains: Inconsistent domain behavior between different geodatabase types
    Existing ENH-000142247 (not new): Provide ability to display domain descriptions for views that are registered with the geodatabase.
  2. Further, if I register the fGDB database view with the geodatabase (domain is automatically removed from the view), then I use the Assign Domain to Field geoprocessing tool, then I get an error: ERROR 000499: table is not editable. Why do I get that error?
    Edit: Esri Support Case 03701528 - Database view (registered with GDB) — Assign Domain To Field works in eGDB and mGDB, but not fGDB
    BUG-000170416 - The Assign Domain To Field tool fails with "ERROR 000499: table is not editable" while working on views registered with the file geodatabase.
  3. Why does registering the fGDB view with the geodatabase remove the domain from the view?
    Edit: Esri Support Case 03702306 - Registering FGDB database view with geodatabase removes domain from the view
    Existing ENH-000142247 (not new): Provide ability to display domain descriptions for views that are registered with the geodatabase.
AJR
by

@SSWoodward  - When doing a select * query, some/most of the domains (and aliases) from the underlying feature class come across in the view.  But if specific fields are selected (i.e. some subset of fields from the source table/feature class) or some fields are modified (i.e. the view might contain a calculated field that's a metric conversion of data that's stored in feet in the source table) it seems to cause some of the columns (that aren't modified) from the source data not to have their aliases and domains applied to the view.  Additionally, pulling the domain information from the source table/feature class is a good "first-cut" since often that will be the desired result, there could be instances where needing to apply a different domain is needed.  One example might be a view that is a union of two tables, where the resulting domain that might need to be applied to a column might not belong to either of the source tables, but might be a third/different domain.  The ideal solution here would be to allow the user to create/modify which domains are applied to which fields in a database view (although the "default" of just using the domain from a single source table is is good start).

Bud
by

Regarding Esri Case #03702306 - Registering FGDB database view with geodatabase removes domain from the view

I uncovered a side issue in that case:
"I noticed an issue that happens even before the register with geodatabase step. If the underlying feature class is not already added to the Contents, then when I add an unregistered view to the Contents, the domain won't be honored. That seems like a bug too."

SSWoodward

@AJR @Bud 

I'm having some folks look into the behavior were seeing and I'll update this Idea when I have any more info for you. 

Bud
by

Thanks @SSWoodward. I updated my earlier comment to include bug numbers and ENH numbers: https://community.esri.com/t5/arcgis-pro-ideas/file-geodatabase-views-should-support-domains/idc-p/1... All three Support cases are now closed.