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 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

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Table To Geodatabase

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts one or more tables to geodatabase tables in an output geodatabase. The inputs can be dBASE, INFO, VPF, OLE DB tables, geodatabase tables, or table views.

Usage

  • The name of the output geodatabase tables will be based on the name of the input table. To control the output name, and for additional conversion options, use the Table To Table tool.

  • The Copy Rows and Table To Table tools can also be used to convert a table to a geodatabase table.

  • If the name of the output table already exists in the output geodatabase, a number will be appended to the end of the name to make it unique (for example, OutputTable_1).

Syntax

arcpy.conversion.TableToGeodatabase(Input_Table, Output_Geodatabase)
ParameterExplanationData Type
Input_Table
[Input_Table,...]

The list of tables to be converted to geodatabase tables. Input tables can be INFO, dBASE, OLE DB, geodatabase tables, or table views.

Table View
Output_Geodatabase

The destination geodatabase where the tables will be placed.

Workspace

Derived Output

NameExplanationData Type
Derived_Geodatabase

The geodatabase containing the new tables.

Workspace

Code sample

TableToGeodatabase example 1 (Python window)

The following Python window script demonstrates how to use the TableToGeodatabase tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.TableToGeodatabase_conversion(["accident.dbf", "vegtable.dbf"], 
                                    "C:/output/output.gdb")
TableToGeodatabase example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the TableToGeodatabase tool.

# Name: TableToGeodatabase_Example2.py
# Description: Use TableToDBASE to copy tables to geodatabase format
 
# Import system modules
import arcpy
 
# Set environment settings
arcpy.env.workspace = "C:/data"

# Make list of all tables in workspace
tables = arcpy.ListTables()
# list of tables should be similar to this: ["accident.dbf", "vegtable.dbf"]
 
# Set local variables
outLocation = "C:/output/output.gdb"

# Execute TableToGeodatabase
print("Importing tables to gdb: " + outLocation)
arcpy.TableToGeodatabase_conversion(tables, outLocation)

Environments

  • Current Workspace
  • Output CONFIG Keyword
  • Scratch Workspace
  • Extent
  • Qualified Field Names

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • About loading data into existing feature classes and tables
  • Copy Rows
  • Loading data in the Catalog tree
  • About loading data in ArcMap
  • Geodatabases
  • An overview of the To Geodatabase toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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