<?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 Definition Queries and exporting to shapefile in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343557#M26883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm fairly new to python and was able to figure out how to do an export from our organization's SDE feature class to a shapefile through python. I'm trying to figure out how to do a an EQUAL TO definition from my SDE feature class and then have it export it to a shapefile with the definition query. For example, I have a feature class in SDE of sewer manholes and within that feature class I'm trying to pull out just the abandoned manholes and have be its own shapefile.&lt;/P&gt;&lt;P&gt;Any tips, suggestions, or sample codes would be helpful.&lt;/P&gt;&lt;P&gt;I've also attached a screen shot of the code I'm using to the feature class into a shapefile. I just need to add into that for the definition query portion of my task.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Feb 2017 15:48:33 GMT</pubDate>
    <dc:creator>MarcosMendez</dc:creator>
    <dc:date>2017-02-16T15:48:33Z</dc:date>
    <item>
      <title>Definition Queries and exporting to shapefile</title>
      <link>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343557#M26883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm fairly new to python and was able to figure out how to do an export from our organization's SDE feature class to a shapefile through python. I'm trying to figure out how to do a an EQUAL TO definition from my SDE feature class and then have it export it to a shapefile with the definition query. For example, I have a feature class in SDE of sewer manholes and within that feature class I'm trying to pull out just the abandoned manholes and have be its own shapefile.&lt;/P&gt;&lt;P&gt;Any tips, suggestions, or sample codes would be helpful.&lt;/P&gt;&lt;P&gt;I've also attached a screen shot of the code I'm using to the feature class into a shapefile. I just need to add into that for the definition query portion of my task.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343557#M26883</guid>
      <dc:creator>MarcosMendez</dc:creator>
      <dc:date>2017-02-16T15:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Queries and exporting to shapefile</title>
      <link>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343558#M26884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest making a Feature Layer, which would allow you to use a query to subset your data down to what you want prior to converting it to a shapefile.&amp;nbsp; Then use that Feature Layer as your input for feature class to shapefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conversely you can do a select by attribute and do something similar to this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/121098"&gt;https://community.esri.com/thread/121098&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way take a look at Josh Bixby's post in that link above about properly formatting SQL queries in Python, will help you get the syntax right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 16:09:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343558#M26884</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-02-16T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Queries and exporting to shapefile</title>
      <link>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343559#M26885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Making the feature class into a Feature Layer worked!&lt;/P&gt;&lt;P&gt;Thanks for your suggestion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 17:11:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343559#M26885</guid>
      <dc:creator>MarcosMendez</dc:creator>
      <dc:date>2017-02-16T17:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Queries and exporting to shapefile</title>
      <link>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343560#M26886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/select.htm"&gt;Select&lt;/A&gt; geoprocessing tool to do this in a single step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 17:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/definition-queries-and-exporting-to-shapefile/m-p/343560#M26886</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2017-02-16T17:17:38Z</dc:date>
    </item>
  </channel>
</rss>

