Solved! Go to Solution.
import arcpy, os #Set workspace environment to geodatabase arcpy.env.workspace = r"Database Connections\PROD_fakesrv1.SDE.sde" #Get list of tables in geodatabase TBs = arcpy.ListTables() #Loop through tables in list for TB in TBs: if TB == "DBASERVICE.TOAD_PLAN_TABLE": continue if TB == "TSMSYS.SRS$": continue if TB == "NDOT.VW_CDS": continue #List tables in feature dataset fields = arcpy.ListFields(TB) #Loop through fields for field in fields: #Check if field has domain if field.domain != "": #Print table, field, domain name print TB, ",", field.name, ",", field.domain
tags.
import arcpy #Set workspace environment to geodatabase arcpy.env.workspace = r"Database Connections\PROD_fakesrv1.SDE.sde" #Get list of feature classes in geodatabase FCs = arcpy.ListFeatureClasses() #Loop through feature classes in list for FC in FCs: #List fields in feature class fields = arcpy.ListFields(FC) #Loop through fields for field in fields: #Check if field has domain if field.domain != "": #Print feature class, field, domain name print FC, ",", field.name, ",", field.domain #Get list of tables in geodatabase TBs = arcpy.ListTables() #Loop through tables in list for TB in TBs: #List tables in feature dataset fields = arcpy.ListFields(TB) #Loop through fields for field in fields: #Check if field has domain if field.domain != "": #Print table, field, domain name print TB, ",", field.name, ",", field.domain
import arcpy, os #Set workspace environment to geodatabase arcpy.env.workspace = r"Database Connections\PROD_fakesrv1.SDE.sde" #Get list of tables in geodatabase TBs = arcpy.ListTables() #Loop through tables in list for TB in TBs: if TB == "DBASERVICE.TOAD_PLAN_TABLE": continue if TB == "TSMSYS.SRS$": continue if TB == "NDOT.VW_CDS": continue #List tables in feature dataset fields = arcpy.ListFields(TB) #Loop through fields for field in fields: #Check if field has domain if field.domain != "": #Print table, field, domain name print TB, ",", field.name, ",", field.domain