I have a SQL Server database of tables that I would like to convert to domains. The tables have an int field that I would like to use for the code field and a varchar field I would like to use for the description field.
When I attempt to run the Table to Domain geoprocessing tool, only the varchar field appears in the dropdowns.
If I try running the tool from the command line using,
arcpy.TableToDomain_management(r'D:\Path to database\places.sde\CreditCardType',"CreditCardType_id","TypeName",r'D:\Path to fgdb\New_DB.gdb',"CreditCardDomain","Valid Credit Card Types")
I get the following error:
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000308: Invalid field type
Failed to execute (TableToDomain).
The description for that error is "The field entered must be of a specific type.". The Help doc for Table to Domain doesn't specify what field types are valid. I can use Table to Domain on an fgdb table with an int field. Is this specific to SQL Server?
ETA: this appears to only be an issue when a primary key restraint is applied to the int field. Does anyone have a workaround for this?