POST
|
Thank you for hints. I change my script: import arcpy, os from os import path as p source= r'C:\Data\Data.gdb' destination= r'C:\Data\Base.gdb' Tables= r'C:\Data\Tables.txt' w=open(Tables,'r') lines=w.readlines() for line in lines: print (p.join(source,line)) arcpy.TableToTable_conversion(p.join(source,line),destination,line) w.close() and I still have the same error. I attach jpg file to show the paths to my data and my txt file. I think that paths are correct. Your solution are better than use txt file but I am new in Python and I try to understand why it does not work :). I apologize for this madness 🙂 [ATTACH=CONFIG]20067[/ATTACH]
... View more
12-19-2012
01:05 AM
|
0
|
0
|
453
|
POST
|
Thank you for help. I'm curious why my solution does not work? 🙂 Is it possible to use txt file?
... View more
12-18-2012
11:55 AM
|
0
|
0
|
490
|
POST
|
It would be much easier to use the ListTables() function.
import arcpy, os
from os import path as p
arcpy.env.workspace = source = r"C:\Data\Data.gdb"
destination= r"C:\Data\Base.gdb"
for table in arcpy.ListTables('Table_*'): # IF tables really are named like Table_A
arcpy.TableToTable_conversion(p.join(source,table),destination,table)
print 'Exported %s to %s' %(table,destination)
OK, but I would like to import not all tables from source geodatabase (only Table_A and Table_B). I'm not interested in Table_C . Thanks for help.
... View more
12-18-2012
11:40 AM
|
0
|
0
|
490
|
POST
|
Yes, there is. For one table in txt file it works. The same script with import feature classes from one geodatabase to another (FeatureClassToGeodatabase_conversion), works correct.
... View more
12-18-2012
11:34 AM
|
0
|
0
|
490
|
POST
|
Hello, I have a source geodatabase with three tables: Table_A, Table_B and Table_C. I would like to export two of them to another geodatabase. The list of tables I would like to export is written in txt files. I've written a script in Python to do that but I have an error when I run it. When the list contains only one table's name, the export is accomplished correctly. Can You help mi with this script? import arcpy source="C:\\Data\\Data.gdb\\" destination="C:\\Data\\Base.gdb" Tables="C:\\Data\\Tables.txt" w=open(Tables,'r') lines=w.readlines() for line in lines: arcpy.TableToTable_conversion(source+line,destination,line) w.close() Error: "arcgisscripting.ExecuteError: ERROR 999999: Error executing function. The table was not found. The table was not found. [Table_A] Failed to execute (TableToTable)."
... View more
12-18-2012
10:58 AM
|
0
|
23
|
1315
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|