Appearance
Publication
Overview
Publication is the process of pushing data into the Mapworks ecosystem. During this process, Mapworks will encode the geographic data in format optimised for visualisation.
The Mapworks system maintains the previously published data which you may revert to by using the rollback process if there are issues with the most recent publication. You may also choose to unpublish the data altogether which maintains the configuration of the dataset but wipes all data associated with it.
Manual Publication
To manually publish a dataset:
- Highlight the dataset in Mapworks UI
- Click Publish
Unpublish
Datasets can be 'unpublished'. Note that this is an irreversible action that will wipe all data and previous history from the dataset.
To unpublish a dataset:
- Highlight the dataset in Mapworks UI
- Click Unpublish
Publication Schedules
A publication schedule can be set for datasets using PostgreSQL or SQL server.
Modes of publication:
- Full Refresh – Completely wipe and reload all features on schedule
- Incremental – Scan features by a 'last modified' field and only update features with changes
- Live – Query directly to the database at short intervals
- Manual – Dataset will not publish without manual intervention
Note: A layer must be configured as either standard or live on the initial configuration but the interval can be adjusted later.
If a publication schedule is not enabled, the dataset will not update unless manually triggered.
Consistency Check
The Consistency Checker tool compares a dataset's published data with the source database and updates any mismatched features. The intended use for this is to repair incremental datasets in cases when database clock sync issues have caused some features not to be updated.
To run a consistency check:
- Highlight the dataset in Mapworks UI
- Click Run Consistency Check
Publication Rollback
When a dataset is published, the most recent previous version of the data is saved.
To rollback a dataset:
- Select the dataset in Mapworks UI
- Click Advanced
- Click Roll Back to Previous Version
Publication Hooks
Publication Hooks call a function to confirm whether an underlying script has finished updating a table before allowing Mapworks to proceed with its publication. This is to avoid scenarios where long running scripts may conflict with a scheduled publication.
This is only applicable for PostgreSQL databases. Publication hooks are a user defined database function that will run in the context of the dataset's database connection. The hook will be invoked at these points in the publication lifecycle:
- Before publication starts
- After publication starts
- After publication finishes
- When a publication error is encountered
The payload will contain the event type and relevant dataset information. In the case of a 'before publication' event, publication may be cancelled with an appropriate response to the hook.