laptop and a wrench

Bug

Unable to list data sources using the workspace factory object if the layer contains a join.

Last Published: February 3, 2020 ArcGIS Pro
Bug ID Number BUG-000126288
SubmittedOctober 25, 2019
Last ModifiedFebruary 14, 2025
Applies toArcGIS Pro
Version foundN/A
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

When joins are present on a layer, the connection properties dictionary includes the join information. The dictionary is different for layers with joins vs layers without joins. The difference in dictionary structure needs to be accounted for in the script. Layers can have zero, one or many joins. Use a recursive function to accomplish this: ```import arcpydef ConPropsWithJoins(cp): if 'source' in cp: return ConPropsWithJoins(cp['source']) else: print(' ', '- database:', cp['connection_info']['database']) print(' ', '- dataset:', cp['dataset']) print(' ', '- workspace_factory:', cp['workspace_factory'])aprx = arcpy.mp.ArcGISProject(r"C:\temp\fgdb_012joins.aprx")m = aprx.listMaps()[0]for lyr in m.listLayers(): print(f"LAYER: {lyr.name}") if lyr.supports("dataSource"): cp = lyr.connectionProperties if cp is not None: ConPropsWithJoins(cp)```

Steps to Reproduce

Bug ID: BUG-000126288

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options