Select to view content in your preferred language

Extracting a Selection of Records and It's Related Records

245
2
09-17-2024 11:13 PM
Labels (2)
tiztrain
Frequent Contributor

Hey all,

Was pretty excited to see that there was a new tool called 'Extract Data from Geodatabase' which could:

  • Extract records and associated records from related tables
  • Use the selection created or be able to extract using an intersect

When I try to run the tool with just my selection I get Error 003837: Extract Data from Geodatabase error: The domain was not found.

tiztrain_0-1726639851895.png

That domain exists from where I am trying to extract data from so not sure why there is an issue.

I noticed the intersect tool only works with polygons, if it worked with points that would have been enough.

Anyone have a better recommended way to export with associated records?

2 Replies
DavidSolari
MVP Regular Contributor

If you're up to using Python, you can combine this function:

 

def get_related_objects(parent_path: str) -> list[str]:
    from os import path
    desc = arcpy.da.Describe(parent_path)
    root = path.dirname(desc["catalogPath"])
    return [path.join(root, x) for x in desc.get("relationshipClassNames", [])]

 

with your preferred export tools to dump the parent object and all related objects.

tiztrain
Frequent Contributor

Ok cool. Will do that next time cause I will undoubtly run into the same issue again in the future and I don't think the 'preserve global id' options will work for fgdb any time soon.

This time around I ended up working through this workflow
How To: Preserve GlobalID/GUID Relationships when Appending Records (youtube.com)

0 Kudos