<?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 Connect to SDE with arcpy in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716969#M23737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All I can find in the help for connecting to an SDE with arcpy is how to make a SDE connection file. I already have one of those because the SDE is available in catalog (C:\Documents and Settings\cmathers\Application Data\ESRI\ArcCatalog\OSA@sde@bay-gis.sde). I just want to know how to read that file with arcpy and then read some data from the server. How do I connect to the SDE from python?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Aug 2010 18:40:28 GMT</pubDate>
    <dc:creator>ChrisMathers</dc:creator>
    <dc:date>2010-08-13T18:40:28Z</dc:date>
    <item>
      <title>Connect to SDE with arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716969#M23737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All I can find in the help for connecting to an SDE with arcpy is how to make a SDE connection file. I already have one of those because the SDE is available in catalog (C:\Documents and Settings\cmathers\Application Data\ESRI\ArcCatalog\OSA@sde@bay-gis.sde). I just want to know how to read that file with arcpy and then read some data from the server. How do I connect to the SDE from python?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 18:40:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716969#M23737</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2010-08-13T18:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SDE with arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716970#M23738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To list data from the server, you can do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy
from arcpy import env
env.overwriteOutput = True
env.workspace = r"C:\Documents and Settings\cmathers\Application Data\ESRI\ArcCatalog\OSA@sde@bay-gis.sde"
fcList = arcpy.ListFeatureClasses()

# Copy shapefiles to a file geodatabase
#
for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print fc


&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's just one example of how you can use sde connection files.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you wanted to reference a feature class, you could do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc = r"C:\Documents and Settings\cmathers\Application Data\ESRI\ArcCatalog\OSA@sde@bay-gis.sde\&amp;lt;FeatureClassName&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:42:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716970#M23738</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2021-12-12T06:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to SDE with arcpy</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716971#M23739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot. Using the sde file as the workspace is just what I needed to know!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 13:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/connect-to-sde-with-arcpy/m-p/716971#M23739</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2010-08-16T13:17:38Z</dc:date>
    </item>
  </channel>
</rss>

