I'm trying to automate a regular workflow via Data Pipelines. The current workflow I follow involves performing a spatial join, then filtering for join_count and performing different actions depending on the join count.
I might be misunderstanding something here, but I can only get a join count using one-to-one, and the attributes aren't actually joined together in the table - I only have the original feature attributes and an extra join count field.
If I perform a one-to-many join I can access the joined attributes, but I don't have a join count field to filter by.
Am I missing something here? Is there another way to achieve this workflow?
Spatial Join (Analysis)—ArcGIS Pro | Documentation
When the Join Operation parameter is set to Join one to many, there can be more than one row in the output feature class for each target feature. Use the JOIN_FID field to determine which feature is joined to which target feature (TARGET_FID). A value of -1 for the JOIN_FID field means no feature meets the specified spatial relationship with the target feature.
Is as you describe.
since you now have multiple records for a location, are you trying to get a summary count?
Summary Statistics (Analysis)—ArcGIS Pro | Documentation
@DanPatterson I'm sorry, I don't see a JOIN_FID field anywhere. I notice that the documentation you link is for ArcPro, whereas I'm trying to perform this operation in Data Pipelines within AGOL
If the join_count is 0 I would like to take no action.
If the join_count is 1 I would like to perform further attribute checks before branching out into other operations depending on the checks.
If the join_count is greater than 1 I would like to return a list of those features for manual review.
Hi @BlakeMorrison, one-to-one joins create summarized values for all "Join" dataset records that match a single "Target" dataset record, so it doesn't return the "Join" attribute values themselves. By default, the only summary statistic is the count, but more can be added with the "Summary fields" parameter. Then one-to-many joins create a new record for each matching "Join" dataset record, but they don't summarize so they don't include the count.
A couple ideas to accomplish what you described:
Let us know if this helps! And thank you for the question