<?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 Create Replica using arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755678#M58288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a replica using python/arcpy and the tables which are being replicated are empty, only the schema is replicated. Is it possible to replicate also all the data in the tables using arcpy?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 12:06:01 GMT</pubDate>
    <dc:creator>AsteriosTselepis1</dc:creator>
    <dc:date>2016-10-14T12:06:01Z</dc:date>
    <item>
      <title>Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755678#M58288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a replica using python/arcpy and the tables which are being replicated are empty, only the schema is replicated. Is it possible to replicate also all the data in the tables using arcpy?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 12:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755678#M58288</guid>
      <dc:creator>AsteriosTselepis1</dc:creator>
      <dc:date>2016-10-14T12:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755679#M58289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Asterios,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the&amp;nbsp;CreateReplica_management function, the default for the &lt;STRONG&gt;expand_feature_classes_and_tables&lt;/STRONG&gt; parameter for feature classes is to replicate all features; the default for tables is to replicate the schema only.&amp;nbsp; You will want to set this parameter to &lt;STRONG&gt;ALL_ROWS&lt;/STRONG&gt; to replicate the table rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 13:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755679#M58289</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2016-10-14T13:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755680#M58290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried ALL_ROWS and the replicated table still remained empty. Is there any update on this issue? &lt;/P&gt;&lt;P&gt;I guess replicating table with records should be DEFAULT because that is normally what replication does. From the project automation point of view it is much easier if this can be done by Arcpy.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;KP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 16:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755680#M58290</guid>
      <dc:creator>KipoKipo</dc:creator>
      <dc:date>2017-07-27T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755681#M58291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kipo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post your exact code snippet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 13:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755681#M58291</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2017-07-28T13:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755682#M58292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GP tool ran through and the snippet is as follows, but the table is still empty. Only&amp;nbsp;with the Distributed Geodatabase toolbar did the table replica run through with complete records, based on my experience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CreateReplica_management(in_data="c:/Work/sqlcon/sqlwork.sde/sqlwork.DBO.ACIT", in_type="ONE_WAY_REPLICA", out_geodatabase="c:/Work/sqlcon/ser2work.sde", out_name="TabRep", access_type="FULL", initial_data_sender="PARENT_DATA_SENDER", expand_feature_classes_and_tables="ALL_ROWS", reuse_schema="DO_NOT_REUSE", get_related_data="GET_RELATED", geometry_features="", archiving="DO_NOT_USE_ARCHIVING")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 15:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755682#M58292</guid>
      <dc:creator>KipoKipo</dc:creator>
      <dc:date>2017-07-28T15:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755683#M58293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kipo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using the C path, try to utilize your direct database connection to your sqlwork.sde&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example my original SQL geodatabase is Enterprise_SDE&lt;/P&gt;&lt;P&gt;Replicated database is Replicated_SDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feature Class is "python_precision"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the path to the origin feature class using the database connection path:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Database Connections\Enterprise_SDE&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sde\Enterprise&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SDE&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;python_precision‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="364858" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/364858_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="364925" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/364925_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="364926" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/364926_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to get the code below to work just fine utilizing the actual database connection paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateReplica_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_data&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Database Connections\Enterprise_SDE.sde\Enterprise.SDE.python_precision"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ONE_WAY_REPLICA"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_geodatabase&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Database Connections\Replicated_SDE.sde"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TabRep"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; access_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FULL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; initial_data_sender&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"PARENT_DATA_SENDER"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; expand_feature_classes_and_tables&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ALL_ROWS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; reuse_schema&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DO_NOT_REUSE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; get_related_data&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GET_RELATED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; geometry_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; archiving&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DO_NOT_USE_ARCHIVING"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try that and let me know if that works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755683#M58293</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2021-12-12T08:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755684#M58294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;I still have no luck with this featureTable replication. The replicated table has only schema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.CreateReplica_management(in_data="Database Connections/sqlwork.sde/sqlwork.DBO.ACIT", in_type="ONE_WAY_REPLICA", out_geodatabase="Database Connections/ser2work.sde", out_name="TabRep", access_type="FULL", initial_data_sender="PARENT_DATA_SENDER", expand_feature_classes_and_tables="ALL_ROWS", reuse_schema="DO_NOT_REUSE", get_related_data="GET_RELATED", geometry_features="", archiving="DO_NOT_USE_ARCHIVING")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;KP&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 20:23:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755684#M58294</guid>
      <dc:creator>KipoKipo</dc:creator>
      <dc:date>2017-07-28T20:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755685#M58295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kipo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry that is still not working for you. &amp;nbsp;What version of ArcGIS are you utilizing for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Desktop&lt;/P&gt;&lt;P&gt;2. SDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what version of SQL Server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:41:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755685#M58295</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2017-07-31T15:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755686#M58296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;I'm using 10.5 and Sql Express 2014. Comparing your snippet with mine I&lt;/P&gt;&lt;P&gt;suspect that the express version might be the issue?&lt;/P&gt;&lt;P&gt;KP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 17:10:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755686#M58296</guid>
      <dc:creator>KipoKipo</dc:creator>
      <dc:date>2017-07-31T17:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755687#M58297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently having the very same issue using model builder and ArcGIS 10.4 advanced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 14:46:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755687#M58297</guid>
      <dc:creator>DarylHochhalter</dc:creator>
      <dc:date>2018-06-01T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create Replica using arcpy</title>
      <link>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755688#M58298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had issues with this in 10.3.1 and gave up trying to use python or model builder and just did it using ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have upgraded to 10.5.1 recently and I'm taking a look to see if this was fixed or easier in the new version. I found this in the tool help for the "Create Replica" tool. I haven't tried it yet, but it seems promising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Replica (Data Management)&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;For tables the default filter is Schema Only; only the schema for the table will be replicated. To apply a filter to a table you must first create a table view setting desired filters. You can then use this as input into the &lt;SPAN&gt;Create Replica&lt;/SPAN&gt; tool. See the &lt;SPAN&gt;&lt;A _jive_internal="true" class="" href="https://community.esri.com/message/00170000006v000000.htm"&gt;Make Table View&lt;/A&gt;&lt;/SPAN&gt; for more information. For more information on filters and replication see &lt;SPAN&gt; &lt;OBJECT classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" height="0" type="application/x-oleobject" width="0"&gt;&lt;PARAM name="Width" value="0" /&gt;&lt;PARAM name="Height" value="0" /&gt;&lt;PARAM name="Command" value="Related Topics" /&gt;&lt;/OBJECT&gt;&lt;A title="Topic: Preparing data for replication."&gt;Preparing data for replication.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 16:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-replica-using-arcpy/m-p/755688#M58298</guid>
      <dc:creator>JoePlattner</dc:creator>
      <dc:date>2018-09-26T16:00:16Z</dc:date>
    </item>
  </channel>
</rss>

