App Configuration
Managing and configuring the Winning Variant Snowflake Native App
Roles
A user must be assigned the admin
application role to execute any of the examples described on this page.
Manage Compute Pool
Winning Variant creates its own compute pool that it uses to run its services in an isolated environment. The admin
application role is granted the following permissions: OPERATE
, MODIFY
, USAGE
, MONITOR
. This means that an admin
can alter the compute pool directly.
For instance, to scale up the pool:
Manage Services
The Winning Variant services can be managed by an admin using the following stored procedures (all within the management
schema):
Procedure | Description |
---|---|
suspend_services() | Suspends all services. |
suspend_config_service() | Suspends just the configuration service. |
suspend_variant_service() | Suspends just the variant service. |
resume_services() | Resumes all services. |
resume_config_service() | Resumes the configuration service. |
resume_variant_service() | Resumes the variant service. |
get_service_status() | Gets the status of all services. |
get_service_endpoints() | Shows ingress URLs for all services. |
alter_variant_service_warehouse(<WH>) | Changes the query warehouse used by the Variant API service. |
alter_variant_service_instances(...) | Changes the instance configuration for the Variant API service. (read more below) |
Examples
Scaling the Variant API
To scale the Variant API service (such as after scaling up the compute pool), call management.alter_variant_service_instances(<MIN INSTANCES>, <MAX_INSTANCES>, <MIN_READY_INSTANCES>)
.
For instance, on a compute pool with 5 nodes, you may want at least 2 instances (<MIN INSTANCES>
) with both ready (<MIN_READY_INSTANCES>
) and the ability to scale up to all 5 nodes <MAX_INSTANCES>
). That command would look like:
Configuration Properties
While certain components of the app are configurable directly via SQL (i.e., scaling a compute pool), other components may be configured indirectly.
Properties
Property | Description | Default |
---|---|---|
VARIANTAPI:CONFIG_REFRESH_SECONDS | How often (in seconds) to refresh the configuration in the Variant API from the underlying tables. The Variant API must be restarted for this to take effect. Variant API instances are automatically updated with new configuration in real-time, however this exists as a safety fallback to ensure that configuration is fresh. | 21600 (6 hours) |
Set configuration property
To set a property, execute the following procedure:
Example
All values are stored as strings. So even a number, such as 100
should be stored as '100'
.
Get configuration properties
To see the current configuration properties, perform a SELECT
from management.config_properties
.
Example