Access archived table via arcpy

965
1
Jump to solution
10-08-2019 05:52 AM
MollyFoley
Occasional Contributor III

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
MollyFoley
Occasional Contributor III

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
MollyFoley
Occasional Contributor III

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'")‍‍‍‍‍‍‍‍‍‍‍‍