Scheduling Aggregate Builds
You can configure aggregates to be built according to a schedule using the aggregates-creation
endpoint of the AtScale API. This enables you to run builds at convenient times, rather than immediately after catalog deployment, to save on resources and costs.
Scheduled builds are disabled by default, but can be enabled and configured on a per-model basis. You can create multiple schedules for a single model. You can also control the types of aggregates built for each model: user-defined, prediction-defined, or both.
To facilitate schedule creation, AtScale provides the full cURL command for each of your deployed models. The command is prepopulated with the catalog and model IDs; you simply provide your API token and the schedule.
The following sections describe how to create aggregate build schedules. For more information on the aggregates-creation
API endpoint, refer to the AtScale API Documentation.
Prerequsites
To schedule aggregate builds, you must first meet the following requirements:
-
Aggregate build schedules must be enabled on the model. This is controlled by the following model configuration settings:
aggregates.new.build.scheduled
: Enables/disables scheduled builds for the model. This must be set totrue
on the model you want to schedule builds for.aggregates.uda.build.scheduled
: Enables/disables scheduled builds for the model's user-defined aggregates (UDAs).aggregates.predictionDefined.build.scheduled
: Enables/disables scheduled builds for the model's prediction-defined aggregates.
For instructions on configuring model settings, see Configuring Model Settings. For more information on the above settings, see Other Aggregate Settings.
-
You must have the
aggregates_manage
andaggregates_view
realm roles assigned in the Identity Broker. For more information, see Identity Broker Default Roles. -
You must have an API token generated. For more information, see Authentication in the AtScale API Documentation.
-
The models you want to schedule builds for must be deployed. For more information, see Deploying Catalogs.
Create an aggregate build schedule
To create an aggregate build schedule for a model:
-
On the Deployed Catalogs panel, open the catalog you want to schedule builds for, then select the Build tab.
-
Hover over the model and click Copy cURL.
-
Paste the command into your command prompt and edit the following lines:
'Authorization: Bearer <TOKEN>'
: Replace<TOKEN>
with your API token. This can be copied from the Account panel in Design Center."timeExpression": "string"
: Replacestring
with the schedule. This is defined similarly to Cron job time format, with one additional field (seconds) at the beginning. The value must be quoted. For example:"0 25 06 ? * *"
-
Run the command.
Viewing build results
When an aggregate definition or instance is scheduled, it appears on the Aggregates page with a status of Pending. For more information, see Monitoring Aggregate Usage.