Table To Geodatabase (multiple) (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Loads one or more tables into a file geodatabase, personal geodatabase, or ArcSDE geodatabase.
Usage tips
The inputs can include dBASE, INFO, VPF, OLE DB, or geodatabase tables. The inputs can also be table views.
The name of the output table will be the same as the input. For example, if the input table is c:\myworkspace\gondor.dbf, the output table will be named gondor.
If a table's name already exists in the output geodatabase, a number will be appended to the end to make it unique (i.e. gondor_1).
For greater control of the output table name, and to specify a query or control the field names, use the Table To Table tool.
The Copy Rows and Table to Table tools can also be used to load a table or table view into a personal and file geodatabase or an ArcSDE geodatabase.
The following environments affect this tool: configKeyword, extent, MDomain, outputCoordinateSystem, outputMFlag, outputZFlag, scratchWorkspace, spatialGrid1, spatialGrid2, spatialGrid3, workspace, XYDomain, and ZDomain.
Command line syntax
An overview of the Command Line window
TableToGeodatabase_conversion <Input_Table; Input_Table...> <Output_Geodatabase>
Parameter | Explanation | Data Type |
<Input_Table; Input_Table...> |
One or more dBASE, INFO, VPF, OLD DB, or personal, file, and ArcSDE geodatabase tables to be loaded into a personal, file, or ArcSDE geodatabase. |
Table View |
<Output_Geodatabase> |
The output or destination geodatabase. This can be a personal or file geodatabase or and ArcSDE geodatabase. |
Workspace |
TableToGeodatabase (c:\data\mydbase.dbf ; c:\data\myinfo.dat) c:\mySDEConnection.sde
Scripting syntax
About getting started with writing geoprocessing scripts
TableToGeodatabase_conversion (Input_Table, Output_Geodatabase)
Parameter | Explanation | Data Type |
Input_Table (Required) |
One or more dBASE, INFO, VPF, OLD DB, or personal, file, and ArcSDE geodatabase tables to be loaded into a personal, file, or ArcSDE geodatabase. |
Table View |
Output_Geodatabase (Required) |
The output or destination geodatabase. This can be a personal or file geodatabase or and ArcSDE geodatabase. |
Workspace |
# ConvertDBasesToGDB.py # Purpose: Convert all the dbf files in a folder to a personal geodatabase # Requirements: None # Author: ESRI # Date: 12/12/03 # Create the Geoprocessor import arcgisscripting gp = arcgisscripting.create() # Set some variables to use in multiple places inFolder = "c:/data" outGeodatabase = "c:/junk/x.mdb" inTables = "" gp.Workspace = inFolder tbs = gp.ListTables() tb = tbs.Next() while tb: if inTables: inTables = inTables + " ; " + tb else: inTables = tb tb = tbs.Next() # Put a try-except-look around the tool, in case an error occurs try: print "Importing the following tables: " + inTables gp.TableToGeodatabase(inTables, outGeodatabase) except: # If an error occurred, print the messages returned by the tool print gp.GetMessages() print "FINISHED"