<?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: Merge Feature Classes within a GDB into one Feature Dataset? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222224#M17159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why is import sys needed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2016 14:21:13 GMT</pubDate>
    <dc:creator>HollyBiery</dc:creator>
    <dc:date>2016-08-03T14:21:13Z</dc:date>
    <item>
      <title>Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222219#M17154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to pull multiple feature classes within a GDB into one Feature Dataset. I am still new at Python and&amp;nbsp; am unsure of the correct structure needed to merge all of the FC into one FD. Sorry for the limited Python knowledge, I am trying to grasp the basic structure to run this simple code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it look something close to this? I don't know if I did the input parameter correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222219#M17154</guid>
      <dc:creator>HollyBiery</dc:creator>
      <dc:date>2016-08-02T22:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222220#M17155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;line 8 is not needed, you could simply exit or print an error message&lt;/P&gt;&lt;P&gt;add &lt;/P&gt;&lt;P&gt;import sys &lt;/P&gt;&lt;P&gt;to the top of the script, then test to see if datasets is empty and if it is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print("exiting, nothing to work on")&lt;/P&gt;&lt;P&gt;sys.exit()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;line 18 is indented improperly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now did you get error messages? cause it is hard to comment further without testing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222220#M17155</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-02T22:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222221#M17156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is a one type thing, you may just want to use on of the tools already available.&amp;nbsp; Of course it will depend on what the data is you are trying to combine....same type? same data structure?&amp;nbsp; same coordinate system?&amp;nbsp; If any thing is different, it could complicate things, andcdepending on the input, it may be easier to massage the data before combining.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/merge.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/merge.htm"&gt;Merge—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Merge....Combines multiple input datasets of the same data type into a single, new output dataset. This tool can combine point, line, or polygon feature classes or tables.&lt;/P&gt;&lt;P&gt;Use the &lt;A class="xref" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/append.htm"&gt;Append&lt;/A&gt; tool to combine input datasets with an existing dataset.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit...my guess is you are using this as an exercise to learn python.....I'll bow out to Dan, since it looks like he is on the task to help....&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222221#M17156</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-08-02T22:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222222#M17157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will need to do this on multiple GDB's so I think that a python code would be the fastest way to manage it. All of the data is in the same Coordinate system and has the same structure, so I don't believe that should be an issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:23:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222222#M17157</guid>
      <dc:creator>HollyBiery</dc:creator>
      <dc:date>2016-08-02T22:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222223#M17158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to add all of the feature class paths to be merged into a list, which will be the first parameter in the &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/merge.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Merge &lt;/A&gt;tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, something along the lines of (obviously, pseudocode):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for ds... # loop datasets
&amp;nbsp;&amp;nbsp;&amp;nbsp; mylist = [] # empty list for each dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc... # loop feature classes
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mylist.append(os.path.join(...)) # add path to list
&amp;nbsp;&amp;nbsp;&amp;nbsp; Merge(mylist,...) # merge list for each dataset&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222223#M17158</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T10:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222224#M17159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why is import sys needed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:21:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222224#M17159</guid>
      <dc:creator>HollyBiery</dc:creator>
      <dc:date>2016-08-03T14:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Feature Classes within a GDB into one Feature Dataset?</title>
      <link>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222225#M17160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in order to use sys.exit() should you wish to bail when a condition isn't meet... sometimes it is better to bail than fail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-feature-classes-within-a-gdb-into-one/m-p/222225#M17160</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-03T14:29:51Z</dc:date>
    </item>
  </channel>
</rss>

