You can perform the following actions on a repository's snapshot table:
- Full snapshot population: This is also called "rebuilding" a snapshot table. Rebuilding a repository's snapshot table repopulates the entire table. EnterWorks will clear any existing records from the snapshot table, then for each record in the repository, write the values of the attributes included in the snapshot table to the snapshot table. It is recommended that when you repopulate the snapshot table, you drop it also.
- Full snapshot population and drop the snapshot table: This is also called "dropping" the snapshot table. If you drop the snapshot table, the table will be entirely recreated, then EnterWorks will retrieve the values of all the attributes in the snapshot table for all the records in the repository, and store them in the new snapshot table. Dropping and recreating the snapshot table guarantees that the snapshot table matches the repository's profile and it takes just as much time as only repopulating the table.
- Populate missing records: If there are any records in the repository that have not been added to the snapshot table, EnterWorks will add those records to the snapshot table. This is particularly useful if a snapshot job has been interrupted or stopped and not all records were added to the snapshot table.
Changes to the data model can affect a repository's snapshot tables, including causing them to be automatically rebuilt. An event that causes the main snapshot table to be rebuilt will also cause the category attribute snapshot table and the multi-language support snapshot tables to be rebuilt, if they exist.
Examples of changes that may trigger the snapshot tables to be automatically rebuilt include:
-
Changing an attribute's data type.
-
Making an attribute repeatable.
-
Adding or removing an attribute from the main snapshot table.
-
Changing a code in a Code Set.
Examples of changes that do not cause the snapshot tables to be automatically rebuilt and therefore the snapshot tables must be built manually include:
-
Making an attribute be multi-language or not multi-language.
-
Enabling or disabling multi-language support for repository's snapshot table.
Rebuilding the snapshot tables is processed as a background job. Once the job has been started, its progress can be monitored in the Job Monitor.
When a snapshot table is rebuilt, the view is deleted and a new one is generated. Any users who had access that was explicitly granted to the old view will no longer have access to it, nor will they have access to the new view until that explicit access has been re-granted. This can be avoided by granting general access to the views so if a view is re-created, it can be accessed without being explicitly granted.
Also, rebuilding a snapshot table can take a while. While a snapshot table is being rebuilt or repopulated, only the repository records that have already been added to the snapshot table are available for use. Records that have not yet been added or re-added will be unavailable.
For these and other reasons, data model changes should not be made during the business day. The best practice is to make changes after business hours, when the impact to users is minimal. After changes to the data model are complete and the affected snapshot tables are rebuilt, if you are explicitly granting access to the snapshot table views, you will need to do so again.