Persisted Aggregations in Packages

Packages can include persisted aggregations as assets. When the same package is installed in multiple views, each install gets its own automatically generated tag. Package queries reference persisted aggregations by alias, which LogScale rewrites to the stored tag at install, update, and analyze time.

From version 1.265, persisted aggregations can be included in packages as assets. The same package can be installed in multiple views that write to the same persisted aggregation repository.

Automatic Tag Generation

Unlike standalone persisted aggregations, where you define the tag manually, package-installed persisted aggregations receive an automatically generated tag. LogScale derives the tag from the scope, package name, view name, and persisted aggregation name. Each install of the same package in a different view produces a distinct tag, so multiple installs can write to the same destination repository without conflict.

The destination repository is resolved by name within the installing organization. The user installing the package must have write access to that repository.

Referencing Persisted Aggregations by Alias

Within a package, queries reference persisted aggregations by alias rather than by the generated tag. Two alias formats are supported:

  • {scope}/{package}/{name} โ€” references the persisted aggregation by scope, package, and name, without specifying the view.

  • {scope}/{package}/{view}/{name} โ€” references the persisted aggregation by scope, package, view, and name.

At install, update, and analyze time, LogScale rewrites these aliases to the stored tag. When you export a package, LogScale writes the tags back as aliases. You do not need to manage tags manually in package queries.

Updating Package Persisted Aggregations

When you update a package, persisted aggregations keep their existing tags. Updates that would change immutable properties of a persisted aggregation are rejected. For the list of immutable properties, see Persisted aggregation properties mutability.