Skip to main content

Built-in Pre-aggregate Persistence

Introduction

Pre-aggregates need to be persisted as respective tables in the data warehouse before Aggregate Awareness can leverage them. This section provides more details about Built-in Holistics Persistence (FullPersistence and IncrementalPersistence).

  • To learn about setting up Holistics Persistence, please refer to the Quick Start setup.
  • These details are not relevant to ExternalPersistence (ref).

Configuring Holistics Persistence

PreAggregate supports configuring persistence using FullPersistence and IncrementalPersistence.

In fact, these types of persistence configs are the same of those used for Query Model Persistence.
Thus, you can refer to these doc sections to configure the Holistics Persistence of your Pre-Aggregates:

Uniqueness of Persisted Tables

Holistics generates a key for each Pre-Aggregate based on its semantics. When running a Persistence, Holistics would associate that key to the persisted table.

The semantics of a Pre-Aggregate includes (but is not limited to):

  • Name
  • Dimensions (including their SQL/AQL definitions)
  • Measures (including their SQL/AQL definitions)
  • Dataset's Relationships (that are relevant to the Dimensions and Measures)
  • Dataset's Data Source

Therefore, if you make semantic changes to your Pre-Aggregate (for example, by changing a Dimension's definition in its Model), because the key is changed, Holistics will not use the old persisted tables of that Pre-Aggregate.

Additional notes:

  • Pre-Aggregates defined in different git branches of your project can re-use the same persisted tables if (and only if) they have the same semantics.

Cleanup for Persisted Tables

Persisted Tables are automatically cleaned up from your Database after a period of time. That period of time is called the Time-To-Live (TTL).

The TTL is refreshed whenever:

  • The persisted table's data is updated.
  • The persisted table is used in a query.

The TTL is 7 days by default.
You can configure it in your Holistics Settings (at Pre-Aggregate Persistence TTL):

performance-pre-aggregate-persistence-ttl

Let us know what you think about this document :)