Table To Geodatabase (Conversion)
Summary
Converts one or more tables to geodatabase tables in an output personal, file, or SDE geodatabase. The inputs can be dBASE, INFO, VPF, OLE DB tables, or 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
Parameter | Explanation | Data Type |
input_table [input_table,...] |
The list of tables to be converted to geodatabase tables. Input tables can be INFO, dBASE, OLE DB, or geodatabase tables, or table views. | Table View |
output_geodatabase |
The destination geodatabase where the output geodatabase tables will be placed. | Workspace |
Code Sample
The following Python window script demonstrates how to use the TableToGeodatabase tool in immediate mode.
import arcpy from arcpy import env env.workspace = "C:/data" arcpy.TableToGeodatabase_conversion(["accident.dbf", "vegtable.dbf"], "C:/output/output.gdb")
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 # Author: ESRI # Import system modules import arcpy from arcpy import env # Set environment settings 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" try: # Execute TableToGeodatabase print "Importing tables to gdb: " + outLocation arcpy.TableToGeodatabase_conversion(tables, outLocation) except: print arcpy.GetMessages()