Custom validations in the Internal Marketplace¶
Custom validations allow organizations to centrally define listing validation rules for internal data products in the Internal Marketplace. Each rule uses natural language to describe the requirement and field hints to help Snowflake Cortex evaluate listing metadata. If a provider uses CREATE LISTING or ALTER LISTING to publish a listing or change a published listing and the listing violates any enabled rule, the operation fails with an error.
Custom validations are created and managed by the GLOBALORGADMIN from the organization
account using the same Internal Marketplace Configuration SQL commands as
custom attributes.
Providers do not configure validation rules directly. Rules with status set to enabled
in the manifest run when a listing is created for publish or when a published listing
is altered.
Note
Custom validations use Snowflake Cortex to evaluate listings against your rules. Validation results may not always be accurate. Review validation results carefully before updating listings or rule definitions.
Key benefits¶
Consistent publishing standards¶
Because validation rules are centrally defined by the GLOBALORGADMIN, every provider is evaluated against the same organizational requirements before a listing goes live.
Natural language rule definitions¶
The rule_text field lets administrators describe validation requirements in plain language.
More descriptive rule text helps Cortex evaluate listings more accurately.
Targeted validation with field hints¶
The fields_of_interest field points validation at specific listing metadata, such as
manifest fields like organization_targets.access or provider metadata like
provider_account_name, so rules focus on the information that matters most.
Centralized control¶
Only users with the CREATE INTERNAL MARKETPLACE CONFIG privilege can create and manage custom validations. This privilege is available by default only to the GLOBALORGADMIN role.
Prerequisites¶
- Validation rule visibility is currently only set at the organization level.
Summary of features¶
- The same CREATE INTERNAL MARKETPLACE CONFIG privilege used for custom attributes.
- A new Internal Marketplace configuration manifest with
config_typeset tolisting_validation_rule. - The same SQL commands documented for custom attributes:
Workflow¶
Organization administrators¶
-
The GLOBALORGADMIN optionally grants the CREATE INTERNAL MARKETPLACE CONFIG privilege to another role within the organization.
-
A user with the CREATE INTERNAL MARKETPLACE CONFIG privilege creates an Internal Marketplace validation rule configuration manifest.
-
The user runs the CREATE INTERNAL MARKETPLACE CONFIG command and references the validation rule manifest.
The validation rule is now available to evaluate listings when
props.statusisenabledand a listing is created for publish or a published listing is altered. -
To enable or disable a rule, ALTER the configuration and set
props.statustoenabledordisabled. To remove a rule, DROP the configuration using the same commands as custom attributes.
Providers¶
Providers do not add validation rules to listing manifests. Enabled validation rules run in the following cases:
- CREATE LISTING creates a listing for publish.
- ALTER LISTING publishes a draft listing.
- ALTER LISTING changes a published listing.
Validation rules do not run in the following cases:
- CREATE LISTING creates a draft listing.
- ALTER LISTING changes a draft listing that remains a draft.
If a listing violates an enabled rule during a validating CREATE LISTING or ALTER LISTING operation, the operation fails with an error.
Internal Marketplace validation rule manifest reference¶
The Internal Marketplace configuration manifest defines a custom validation rule. This section describes the fields available in the configuration manifest.
Top-level fields¶
Each configuration manifest starts with the following fields:
title(String, required, maximum length 80): Configuration title that organization administrators see in Snowsight.description(String, optional, maximum length 150): Configuration description shown in Snowsight. Markdown syntax is supported.config_type(String, required): Type of Internal Marketplace configuration. For custom validations, set this tolisting_validation_rule.
Note
Unlike custom attributes, validation rules do not use the is_required field. Omit
is_required from the manifest, or set it to false if your tooling includes it. To
enable or disable a rule, set status in props to enabled or disabled.
props¶
A YAML object storing validation rule properties. Specify the following fields:
severity(String, required): The severity returned when a listing fails the rule. Currently supported value:error.status(String, required): Whether the rule is active. Supported values:enabledordisabled. Disabled rules are not evaluated when listings are validated.rule_text(String, required, maximum length 2000): A natural language description of the validation requirement. More descriptive text helps Cortex evaluate listings more accurately.hints(Object, required): Guidance for rule evaluation. Includes the following field:-
fields_of_interest(List of strings, required): One to five field paths or provider metadata identifiers to use as hints during validation. You must specify at least one value. Supported values include the following:- Listing manifest
field paths, such as
organization_targets.access. - Provider metadata fields (not part of the listing manifest):
provider_account_nameprovider_deployment_region
- Listing manifest
field paths, such as
-
Validation rule manifest example¶
CREATE INTERNAL MARKETPLACE CONFIG example¶
Creates an Internal Marketplace configuration for a custom validation rule.
For syntax, parameters, and access control requirements, see CREATE INTERNAL MARKETPLACE CONFIG.
Manage validation rules¶
Use the same ALTER, DROP, SHOW, and DESCRIBE INTERNAL MARKETPLACE CONFIG commands as custom attributes. See SQL commands for syntax and examples.
When you run SHOW or DESCRIBE commands, the configType column can return
listing_validation_rule for validation rule configurations. The props column includes
severity, status, rule_text, and hints (including fields_of_interest).
Note
The following fields are immutable after a validation rule is created:
config_type
Custom validations limitations¶
Admin-side limitations¶
- Only users with the CREATE INTERNAL MARKETPLACE CONFIG privilege can create or alter custom validations. This privilege is granted to the GLOBALORGADMIN role by default.
- The
is_requiredfield is not used for validation rules. Omit it from the manifest. Useprops.statusto enable or disable a rule. - Creating and managing custom validations through Snowsight is not supported.
Validation rule limits¶
- Maximum number of custom validation rules per organization: 10
- Minimum number of
fields_of_interestvalues per rule: 1 - Maximum number of
fields_of_interestvalues per rule: 5 - Maximum length of
rule_text: 2000 characters
Provider limitations¶
- Providers cannot opt out of enabled organization validation rules. To bypass a rule,
the GLOBALORGADMIN must disable it by setting
props.statustodisabled, and the provider can retry the CREATE LISTING or ALTER LISTING operation.
Workflow limitations¶
- Validation runs only for CREATE LISTING operations that create a listing for publish and for ALTER LISTING operations that publish a draft listing or change a published listing. Draft listings are not validated while they remain drafts.
- FBE listings are not supported at the moment.