<?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: Access EGDB from SDE regardless of filepath in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417864#M70508</link>
    <description>&lt;P&gt;Then add an input parameter (DEWorkspace) and have the user set the database connection manually to whatever they want.&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 23:28:50 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2024-05-01T23:28:50Z</dc:date>
    <item>
      <title>Access EGDB from SDE regardless of filepath</title>
      <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417651#M70502</link>
      <description>&lt;P&gt;I've created a python toolbox that pulls data from an enterprise GDB, defined by an SDE file.&lt;/P&gt;&lt;P&gt;SDE_connection = os.path.join(SDE_dir, 'mydb_database.windows.net.sde')&lt;/P&gt;&lt;P&gt;my_gdb = os.path.join(SDE_connection, 'my_table')&lt;BR /&gt;arcpy.conversion.ExportTable(my_gdb, some_filepath)&lt;/P&gt;&lt;P&gt;This works fine, however I recently realized when trying to run this toolbox on someone else's computer that Arcpy treats os.path.join('C:\Computer1\my_project', SDE_connection, my_gdb) as being a completely different table than os.path.join('C:\Computer2\my_project', SDE_connection, my_gdb). Trying to access data from the second one results in a table not found error.&lt;/P&gt;&lt;P&gt;I originally created the table in the EGDB with something like: arcpy.conversion.ExportTable(csv_filepath, my_gdb)&lt;/P&gt;&lt;P&gt;How do I use an SDE to access data regardless of the exact filepath to the SDE?&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 17:10:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417651#M70502</guid>
      <dc:creator>sbrowneotogo</dc:creator>
      <dc:date>2024-05-01T17:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Access EGDB from SDE regardless of filepath</title>
      <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417691#M70504</link>
      <description>&lt;P&gt;One way is to put a copy of the SDE connection file on a network drive that everyone has access to, then use the full network path to that SDE connection file as input to the toolbox.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 18:10:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417691#M70504</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-05-01T18:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Access EGDB from SDE regardless of filepath</title>
      <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417740#M70505</link>
      <description>&lt;P&gt;If everyone is using the same database connection and it's not changing often, maybe you can &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-connection.htm" target="_self"&gt;create the database connection&lt;/A&gt; in the script when it's run? Just output to a &lt;A href="https://docs.python.org/3/library/tempfile.html" target="_self"&gt;temp directory&lt;/A&gt; that will get cleaned up when the script finishes. Or you can try a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-connection-string.htm" target="_self"&gt;database connection string&lt;/A&gt; instead of using .sde files.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 19:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417740#M70505</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-05-01T19:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Access EGDB from SDE regardless of filepath</title>
      <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417858#M70506</link>
      <description>&lt;P&gt;The problem is we need to pull data from the GDB to the users workspace when the tool runs, so they can't just create a new one each time. We all need to be accessing the same table. I'm trying out using a database connection string but unable to figure out how to create a GDB with a connection string.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 23:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417858#M70506</guid>
      <dc:creator>sbrowneotogo</dc:creator>
      <dc:date>2024-05-01T23:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Access EGDB from SDE regardless of filepath</title>
      <link>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417864#M70508</link>
      <description>&lt;P&gt;Then add an input parameter (DEWorkspace) and have the user set the database connection manually to whatever they want.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 23:28:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-egdb-from-sde-regardless-of-filepath/m-p/1417864#M70508</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-05-01T23:28:50Z</dc:date>
    </item>
  </channel>
</rss>

