Add the archive class to map
The archive class is created and maintained by the geodatabase when a dataset or class is enabled for archiving. It can be added to a map for viewing and querying.
To add an archive class to a map, complete the following steps:
- Highlight an archive-enabled layer or table in the Contents pane.
- On the contextual Feature Layer ribbon, select the Data tab.
- Click the Add Archive button under the Archiving section of the ribbon.
A new class is added to the Contents pane with the same name as the originally-selected layer but with Archive appended to the end.
Adding the archive class to the map allows you to work directly with the archive. The archive class displays every modification since archiving was enabled. The archive class cannot be edited and is for analysis purposes only.
You can symbolize the layer to help with your analysis. For example, using the GDB_FROM_DATE field as the value field for your symbology color codes the features in the layer based on the time they were last updated.
Query the archive
There are two types of queries that satisfy most questions addressing a class' history: moment and range.
Moment queries are used to query a specific moment in time, which is the same as working with an historical version and connecting to the date and time of interest. These queries are helpful when trying to determine how the data looked at a specific moment or what was in a particular location at a given moment.
Range queries work with the data over a span of time between two moments, a starting moment and an ending moment. These queries allow you to view how a feature or location has changed through time. By looking at time ranges, you can track how an object has been updated throughout its lifetime. This shows you how the data has evolved and allows you to see and compare changes in an object.
Both moment and range queries can be constructed in the definition query builder.
To perform a query using the query builder, right-click the archive class, choose Properties, and click the Definition Query tab.
If you are interested in seeing a specific feature at a specific time, refer to its object ID and enter the appropriate date and time. The following is an example of this type of moment query:
OBJECTID is Equal to 23 AND GDB_FROM_DATE is Before '10/10/2016 9:00:00 AM' and GDB_TO_DATE is After '10/10/2016 9:00:00 AM'
The archive class fields GDB_FROM_DATE and GDB_TO_DATE can also be used to construct a query for a time range. For example, if you want to see how a geographic area changed between May 2, 2014, and May 2, 2016, you could construct the following query:
GDB_FROM_DATE > '5/2/2014 12:00:00 PM' AND GDB_FROM_DATE < '5/2/2016 12:00:00 PM'
This returns all rows inserted and updated between these dates.
Rename the archive class
To change the name of an archive class, complete the following steps:
- Right-click the feature class or table in the Contents pane.
- Click Properties.
- Click the General tab.
- In the Name dialog box, type a new name for the archive class.
- Click OK.