<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: python script to copy table from one gdb to another gdb in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1206714#M7674</link>
    <description>&lt;P&gt;arcpy.ListTables() returns a list object. So you would need something like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;table = arcpy.ListTables("table1")[0]
&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tables = arcpy.ListTables("table1")

table = tables[0]&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 26 Aug 2022 13:00:59 GMT</pubDate>
    <dc:creator>dslamb2022</dc:creator>
    <dc:date>2022-08-26T13:00:59Z</dc:date>
    <item>
      <title>python script to copy table from one gdb to another gdb</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1206709#M7673</link>
      <description>&lt;P&gt;I am trying to copy an SDE geodatabase table to a file geodatabase using a simple script copied below.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; destgdb= 'D:\Data\testAug_23_2022.gdb'&lt;BR /&gt;... arcpy.env.workspace= 'C:\Users\gis4\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog\Connection to gisprd.sde'&lt;BR /&gt;... table = arcpy.ListTables("table1")&lt;BR /&gt;... arcpy.Copy_management(table,os.path.join(destgdb))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is giving following error, can any point out what may be the issue in this script?&lt;/P&gt;&lt;P&gt;Runtime error&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 5, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 4314, in Copy&lt;BR /&gt;raise e&lt;BR /&gt;RuntimeError: Object: Error in executing tool&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 12:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1206709#M7673</guid>
      <dc:creator>junaidjawaid</dc:creator>
      <dc:date>2022-08-26T12:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: python script to copy table from one gdb to another gdb</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1206714#M7674</link>
      <description>&lt;P&gt;arcpy.ListTables() returns a list object. So you would need something like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;table = arcpy.ListTables("table1")[0]
&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tables = arcpy.ListTables("table1")

table = tables[0]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Aug 2022 13:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1206714#M7674</guid>
      <dc:creator>dslamb2022</dc:creator>
      <dc:date>2022-08-26T13:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: python script to copy table from one gdb to another gdb</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1207111#M7685</link>
      <description>&lt;P&gt;Added the suggestion in my script below but this is copying other tables as well, despite I have select the the targeted table from the list using the table index [0]. The table I am copying is a part of a relationship class, may this be the reason that the script is copying the other tables as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;destgdb= 'D:\Data\testAug_23_2022.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... arcpy.env.workspace= 'C:\Users\gis4\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog\Connection to gisprd.sde'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... table = arcpy.ListTables("table1")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;... arcpy.Copy_management(table,os.path.join(destgdb,table))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 08:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-script-to-copy-table-from-one-gdb-to/m-p/1207111#M7685</guid>
      <dc:creator>junaidjawaid</dc:creator>
      <dc:date>2022-08-29T08:23:48Z</dc:date>
    </item>
  </channel>
</rss>

