Select to view content in your preferred language

Issue with Fetching Connectivity Association using Arcade

195
6
Jump to solution
2 weeks ago
Yogesh_Chavan
Frequent Contributor

When trying to use the FeatureSetByAssociation Arcade function for Connectivity Association type, we are not able to fetch the associations, it just returns an empty result.

When we use the Container association type it is returning correct record counts of the associated features

For example with this first TelecomEdgeObject record, we have 12 Containment and 2 Connectivity Associations:

Yogesh_Chavan_0-1754384066477.png

When we try to use Arcade:

Containment:

Returns 12 as count of associated features

Yogesh_Chavan_1-1754383735626.png

Connectivity:

Returns 0 as count of associated features

Yogesh_Chavan_2-1754383752556.png

What could be going wrong here? We tried creating an association(connectivity) manually, and it still does not consider it.

Any thoughts would be helpful!!

0 Kudos
1 Solution

Accepted Solutions
HusseinNasser2
Esri Contributor

If you are looking for junction Edge associations you should use 

featureSetByAssociation($feature, 'junctionEdge') 

 

"Connected" is only for JJ associations 

 

View solution in original post

6 Replies
RobertKrisher
Esri Regular Contributor

I recommend you check out the Arcade documentation for that method for the possible values for the association type parameter: FeatureSet functions | ArcGIS Arcade | Esri Developer.

I don't see 'connectivity' listed as a valid value. Depending on the type of connectivity you're looking for, you should be able to use one of the other association types.

0 Kudos
Yogesh_Chavan
Frequent Contributor

Thank you @RobertKrisher,

We used the "junctionEdge" and it worked.

0 Kudos
HusseinNasser2
Esri Contributor

If you are looking for junction Edge associations you should use 

featureSetByAssociation($feature, 'junctionEdge') 

 

"Connected" is only for JJ associations 

 

Yogesh_Chavan
Frequent Contributor

Thank you @HusseinNasser2,

We used the "junctionEdge" key string for this and it worked. 

As a side note, I admire all your work and blogs on Arcade!!

I would like to know, if you have written a blog/article on how to optimize Arcade scripts? For example we have a script which takes long time to evaluate 250 records, the script(Batch Rule) picks records from the table(GeolocatorLine)--> find that record on the parent table(TelecomEdgeObject(non-spatial)--> fetch all associations(point, line, polygons)--> converts them all to Line and also does a Union--> update the row with geometry. It takes almost 3 hours to complete this.

0 Kudos
RobertKrisher
Esri Regular Contributor

Arcade is not well suited to heavy data processing tasks like this, think of Attribute Rules like triggers. Even when they are set to be batch rules that just means execution is deferred. Each attribute rule is run on each feature. When you run a batch rule on 250 features, you are fetching all that data and recreating the association lines 250 times, once for each feature. I recommend that you rewrite the process to use Python; it should be significantly faster.

This lets you fetch all the data and do all your analysis once, then push all the updates to your 250 features. (instead of rerunning the analysis 250 times). To help get you started I'd recommend you use the Create Association Lines tool to turn all the associations into lines.

Yogesh_Chavan
Frequent Contributor

Thank you @RobertKrisher for the suggestions!

Sure, we'll check if python implementation is possible for the overall requirement.

 

0 Kudos