Access archived table via arcpy

1591
1
Jump to solution
10-08-2019 05:52 AM
MKF62
by
Frequent Contributor

What is the way to do this? I want to 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? 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
MKF62
by
Frequent Contributor

I figured out that you need to make a query layer in order to access this information from arcpy. Script looks like this:

import arcpy, os

collector_db_con = r"Database Connections\CollectorSpatialData_CollectorWriter.sde"
output = arcpy.MakeQueryLayer_management(collector_db_con, "Out", "select * from COVEYCOUNT where GDB_TO_DATE = '2019-09-30 13:56:44.4300000'")‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post

1 Reply
MKF62
by
Frequent Contributor

I figured out that you need to make a query layer in order to access this information from arcpy. Script looks like this:

import arcpy, os

collector_db_con = r"Database Connections\CollectorSpatialData_CollectorWriter.sde"
output = arcpy.MakeQueryLayer_management(collector_db_con, "Out", "select * from COVEYCOUNT where GDB_TO_DATE = '2019-09-30 13:56:44.4300000'")‍‍‍‍‍‍‍‍‍‍‍‍