Skip to main content
The Winning Variant Native App allows users to manage experimentation resources directly inside of Snowflake by use of stored procedures created during installation.

Roles

A user must be assigned of the following application roles to execute any of the procedures described on this page:
  • admin
  • editor

Resource Kinds

All references to kind below must be one of:
  • lab
  • subjecttype
  • experiment
Read more about Resource Kinds.

List Resources

Each of the following “list” commands returns a table with the following columns:
Returns a list of all resources of the given kind. status must be one of ResourceStatus.

Examples

Get YAML for a single resource

Returns a table with the following columns:

Examples

Create or update resource

If the resource with the id specified exists, it gets updated, otherwise it will be created.

Examples

Experimentation Convenience Methods

In addition to the above methods using raw YAML, you may also create/manage experiments with the following purpose-built convenience methods. All methods also have a *_preview variant is available that returns the YAML that would be applied without actually creating the experiment:

Create Experiment

Creates a new experiment with the following inputs. The experiment is created in draft status. Returns: Table with columns operation, kind, id, name, status, description.

Add Variants

Adds one or more new variants to an existing experiment. Variant IDs must not conflict with existing variants. At most 1 control variant is allowed across all variants on the experiment. Returns: Table with columns operation, kind, id, name, status, description.

Add Cohort

Adds a new cohort to an existing experiment. The cohort index is automatically assigned as the next sequential value. The experiment must already have variants defined. Returns: Table with columns operation, kind, id, name, status, description.

Set Experiment Status

Sets the status of an existing experiment. Returns: Table with columns operation, kind, id, name, status, description.

Update Experiment

Updates one or more properties of an existing experiment. Pass NULL for any field that should not change. At least one field must be provided. Returns: Table with columns operation, kind, id, name, status, description.

Get Current Cohort

Returns the current (highest-indexed) cohort for an experiment, with variant details. Returns: Table with columns cohort_index (NUMBER), variant (VARCHAR), name (VARCHAR), description (VARCHAR), is_control (BOOLEAN), split (FLOAT).

Describe Experiment YAML

Given experiment YAML, returns a markdown-formatted description of the experiment including metadata, variants, and cohort details. Returns: Table with a single markdown column containing the formatted description.