Skip to content

Instantly share code, notes, and snippets.

@M-Bryant
Last active February 17, 2017 04:58
Show Gist options
  • Save M-Bryant/92d4f9a9eaad493ebe7dbc2bf61e0603 to your computer and use it in GitHub Desktop.
Save M-Bryant/92d4f9a9eaad493ebe7dbc2bf61e0603 to your computer and use it in GitHub Desktop.
arcpy: list joined tables
import arcpy
def list_join_tables(in_table):
"""Returns a list of tables currently joined to a table or feature class.
List includes the in_table
Returns empty list if no joins
"""
fields = [f.name for f in arcpy.Describe(in_table).fields]
return = list(set([f.split(".")[0] for f in fields if "." in f]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment