How to get distinct data sources of layers and tables in ArcGIS Pro project?
aprx = arcpy.mp.ArcGISProject("CURRENT")
maps = aprx.listMaps()
for map in maps:
print ('--------------------------------------------------------------')
print (map.name)
print ('--------------------------------------------------------------')
layers = map.listLayers()
tables = map.listTables()
for layer in layers:
print (layer.dataSource)
for table in tables:
print (table.dataSource)