<?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: Access archived table via arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/access-archived-table-via-arcpy/m-p/472000#M36871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out that you need to &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-layer.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;make a query layer&lt;/A&gt; in order to access this information from arcpy. Script looks like this:&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&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

collector_db_con &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"Database Connections\CollectorSpatialData_CollectorWriter.sde"&lt;/SPAN&gt;
output &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeQueryLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;collector_db_con&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Out"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"select * from COVEYCOUNT where GDB_TO_DATE = '2019-09-30 13:56:44.4300000'"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:52:34 GMT</pubDate>
    <dc:creator>MKF62</dc:creator>
    <dc:date>2021-12-11T20:52:34Z</dc:date>
    <item>
      <title>Access archived table via arcpy</title>
      <link>https://community.esri.com/t5/python-questions/access-archived-table-via-arcpy/m-p/471999#M36870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the way to do this? I want to&amp;nbsp;be able to read the gdb_from_date and gdb_to_date fields of the archive table using arcpy. How do you instantiate the archived table?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2019 12:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-archived-table-via-arcpy/m-p/471999#M36870</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-10-08T12:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Access archived table via arcpy</title>
      <link>https://community.esri.com/t5/python-questions/access-archived-table-via-arcpy/m-p/472000#M36871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out that you need to &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-layer.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;make a query layer&lt;/A&gt; in order to access this information from arcpy. Script looks like this:&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&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

collector_db_con &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"Database Connections\CollectorSpatialData_CollectorWriter.sde"&lt;/SPAN&gt;
output &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeQueryLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;collector_db_con&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Out"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"select * from COVEYCOUNT where GDB_TO_DATE = '2019-09-30 13:56:44.4300000'"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:52:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-archived-table-via-arcpy/m-p/472000#M36871</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T20:52:34Z</dc:date>
    </item>
  </channel>
</rss>

