ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

ParseTableName

  • Summary
  • Syntax
  • Code sample

Summary

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 enterprise geodatabase.

Syntax

ParseTableName (name, {workspace})
ParameterExplanationData Type
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 enterprise geodatabase.

String

Return Value

Data TypeExplanation
String

Returns the table name parsed into its components (database name, owner name, table name), separated by commas.

Code sample

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(", ")

Related topics

  • ValidateTableName
  • ParseFieldName
  • Validating table and field names in Python

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal