Hello GIS friends,
Is there a way to reference feature classes and data fields from multiple enterprise geodatabase or sql database within an Attribute Rule.
I would like to establish an attribute rule capable of retrieving field information from another database to populate feature class in a separate geodatabase. Is this possible?
I will appreciate your help.
Thank you,
Abi
@AbiDhakal it is not possible to access data from another database. All data must reside in the same data source as the feature you are applying the rule too.
The best way to handle this is to create a view in the same database as your feature, register that view with the database and then you can access that data via attribute rule.
Hope This helps.
~Jake
There is a geoprocessing tool Create Database View (Data Management) it requires some SQLl statement knowledge. If you have a DBA they can also assist.
~Jake
@Jake_SI think you are suggesting to join the features based on a common field to create a view. I'm thinking we could also do this from SQL Server Management Studio...
Thank you for your input.
Abi
@AbiDhakal You can absolutely create views there. There are some requirements needed to register a view with a geodatabase.
You can find all the information here, Register a table or view with the geodatabase.
~Jake
this How To article from tech support may help also:
Create attribute rules to access feature classes in a different database
@Jake_S , @ToddW_stl the view workaround would only work for immediate attribute rules traditionally versioned, right? We have branch versioning set up for the full benefit of attribute rules, which seems incompatible with this workaround as the view would need to be included in the published service to be referenced by the rule, which isn't allowed.
@ChelseaRozek the view workaround would work for immediate calculation and constraint rules in all registration types of enterprise geodatabase workspaces (e.g., non-versioned, traditional versioned, and branch versioned).
Are you trying to create batch calculation and validation rules? If so you need a branch versioned feature service by reference with the validation capability enabled to use these rules. Publishing views to a feature service is not currently supported (see the Prepare data to a feature service help document for more information).
Is there a reason why you cannot have all of your data in the same underlying enterprise geodatabase prior to publishing?
@mkaburis Yeah, that's the issue I'm running into. We have different enterprise geodatabases for different departments so they have full control over the layers they're the subject matter experts of. Thanks for confirming that it's not supported.