HOW TO
Attribute rules are currently set up to function on a specific geodatabase. There are instances where an attribute rule must have access to a feature class in a different enterprise geodatabase. This can be done by creating and registering database views with the geodatabase when the two databases reside on the same instance. This article provides a workflow that allows users to create a view in one database referencing data residing in another database. It is important to note that the user creating these views must have the required permissions to access and query the feature class in the other database.
In this example, we are trying to access the PHARMACIES_TAMALE feature class from the J_Database to use in creating an Attribute Rule on a feature class in the TestingEnvironment database. The two databases are both located in SQL Server.
Use <Active database> GO Create view <name of the view> as Select * from [Target Database].[Schema Owner].[Name of Feature Class]
In this example:
The view is registered with the geodatabase and will now be accessible using Arcade with the $datastore function when setting up your Attribute Rules.
In this article, we explored creating a view in a database and referencing data from another database on the same instance, as well as registering the view with the geodatabase. The registered view was subsequently used to build Arcade expressions when creating an attribute rule for analysis. We created a view based on a feature class in a different database and then registered the view with the active database.
There are instances where the feature class/table you are trying to access is stored in a different database instance or a different data store (Oracle/PostgreSQL). In this case, database links would have to be created to access these tables.
Get help from ArcGIS experts
Download the Esri Support App