<?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: why is arcpy.CreateReplica_management taking forever to run? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267045#M20539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh gotcha, thank you. It was a reading comprehension fail on my part. I see what you're recommending now, and I found the blog post so it all makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The blog post, for those who are curious&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55463"&gt;Filenames and file paths in Python&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jun 2016 16:34:43 GMT</pubDate>
    <dc:creator>RobBlash</dc:creator>
    <dc:date>2016-06-09T16:34:43Z</dc:date>
    <item>
      <title>why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267041#M20535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a bit new to python, but I decided to script out a workflow that I complete often (create checkout replicas). This is my first try at it, based on the sample script in &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/create-replica.htm#C_GUID-917BDC6D-88C3-41B1-8436-522124478890" rel="nofollow noopener noreferrer" target="_blank"&gt;CreateReplica_management help&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran the script via PythonWin to test but I've cancelled it after &amp;gt; 1 hour run time. This would take &amp;lt;1 minute if I ran through the wizard in ArcMap. Any ideas/pointers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Description: Create a checkout to a file GDB

# Import system modules
import arcpy
from arcpy import env

#get list of versions that will be checked out
version_list = "RLB"

#specify the checkout number for version &amp;amp; GDB naming
checkout_number = 1

#specify folder ocation and file name for checkout
working_folder = "D:\RLB\Python\CheckoutScript"
working_file = "TestCO_%s_v%s.gdb" % (version_list, checkout_number)

# Set workspace
env.workspace = "D:\RLB\Python\CheckoutScript\Water_D1_version%s.sde" % (version_list)

# Set local variables
in_data = ["Water_Network", "Water_Features"] # feature datasets
replica_type = "CHECK_OUT"
output_workspace = "%s\%s" % (working_folder, working_file)
replica_name = "MyReplica_%s_v%s" % (version_list, checkout_number)
access_type = "FULL"
initial_sender = "PARENT_DATA_SENDER"
expand = "USE_DEFAULTS"
reuse_schema = "DO_NOT_REUSE"
get_related = "GET_RELATED"
replica_geometry = ""
archiving = "DO_NOT_USE_ARCHIVING"

#create the empty GDB for checkout
arcpy.CreateFileGDB_management(working_folder, working_file)

# Execute CreateReplica
arcpy.CreateReplica_management(in_data, replica_type, output_workspace, replica_name, access_type, \
initial_sender, expand, reuse_schema, get_related, replica_geometry, archiving)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267041#M20535</guid>
      <dc:creator>RobBlash</dc:creator>
      <dc:date>2021-12-11T13:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267042#M20536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;throw in a couple of print statements... it may just be hanging&lt;/P&gt;&lt;P&gt;also use raw format for file path names&amp;nbsp; ie&amp;nbsp;&amp;nbsp;&amp;nbsp; r"c:\mypath\etc"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 15:54:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267042#M20536</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-09T15:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267043#M20537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I'll give it a try., but I don't think it's hung (the checkout gdb was semi-populated, so there was still "work" to be done when I cancelled). I'm currently trying to run it through the window in ArcMap but it's taking equally as long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why use raw file names? The final goal is to loop through several versions and create checkouts for each, so I'd have to use variables in my paths at that point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267043#M20537</guid>
      <dc:creator>RobBlash</dc:creator>
      <dc:date>2016-06-09T16:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267044#M20538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;working_folder = &lt;SPAN class="string"&gt;"D:\RLB\Python\CheckoutScript"&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;working_folder = r&lt;SPAN class="string"&gt;"D:\RLB\Python\CheckoutScript"&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;SPAN class="string"&gt;etc&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;SPAN class="string"&gt;there is a blog post and a poll on filepaths and their problems...I will spare you the details but they are important in python.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:16:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267044#M20538</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-09T16:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267045#M20539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh gotcha, thank you. It was a reading comprehension fail on my part. I see what you're recommending now, and I found the blog post so it all makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The blog post, for those who are curious&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55463"&gt;Filenames and file paths in Python&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267045#M20539</guid>
      <dc:creator>RobBlash</dc:creator>
      <dc:date>2016-06-09T16:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267046#M20540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How much data is being copied into the check-out replica?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there def. queries on the sources layers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/group/1680"&gt;Geodatabase&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:52:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267046#M20540</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2016-06-09T16:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: why is arcpy.CreateReplica_management taking forever to run?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267047#M20541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No definition queries, but the GDB is a decent size. I also realized I was checking out a few feature classes (including a large related table) that I do not typically include. The script did complete in the Desktop python window but it took 52 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently trying again on a small GDB but it's still taking longer than it should.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 17:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-arcpy-createreplica-management-taking/m-p/267047#M20541</guid>
      <dc:creator>RobBlash</dc:creator>
      <dc:date>2016-06-09T17:03:30Z</dc:date>
    </item>
  </channel>
</rss>

