ParseTableName (arcpy)
Récapitulatif
Parses a table name into its components (database, owner, table) depending on the workspace. ParseTableName returns a string containing the parsed table name, with the database name, owner name, and table name separated by commas. This workspace must be a personal, file, or ArcSDE geodatabase.
Syntaxe
ParseTableName (name, {workspace})
Paramètre | Explication | Type de données |
name |
Specifies which table will be parsed. | String |
workspace |
Specifies the workspace for fully qualifying the table name. The workspace must be a personal, file, or ArcSDE geodatabase. | String |
Type de données | Explication |
String |
Returns the table name parsed into its components (database name, owner name, table name) separated by commas. |
Exemple de code
ParseTableName example
Parse a table name into its components.
import arcpy
field_name = arcpy.GetParameterAsText(0)
workspace = arcpy.GetParameterAsText(1)
# Parse the table name into database, owner, and table
fullname = arcpy.ParseTableName(field_name, workspace)
database, owner, table = fullname.split(", ")
Thèmes connexes
4/26/2014