Skip to content

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.

Manual Publication

To manually publish a dataset:

  1. Highlight the dataset in Mapworks UI
  2. Click Publish

Manual publication

Publication Schedules

A publication schedule can be set for datasets using PostgreSQL or SQL server.

Configuring publication

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.

Publication Rollback

When a dataset is published, the most recent previous version of the data is saved.

To rollback a dataset:

  1. Select the dataset in Mapworks UI
  2. Click Advanced
  3. Click Roll Back to Previous Version

Publication Revision

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.

Publication Hooks