Set up auto-fulfillment¶
This section describes how to set up Cross-Cloud Auto-Fulfillment (auto-fulfillment) for secure share data products and application package data products. It also describes how to set up object-level auto-fulfillment for a listing.
You must add a data product to your listing before you can set up auto-fulfillment. Also, the steps to set up auto-fulfillment differ depending on the data product you offer and how you make your listing available.
Set up object-level auto-fulfillment¶
You can configure auto-fulfillment to automatically transfer the data product associated with your listing to other Snowflake regions. You also can use SUB_DATABASE auto-fulfillment and choose to fulfill only the tables and views in a data product to a remote region using auto-fulfillment. This can help reduce costs and ease the manageability burden of your auto-fulfilled data product.
The steps below describe how to set up object-level auto-fulfillment for a listing. As part of a typical workflow, you set up object-level auto-fulfillment when you set up the region availability (for a listing published on the Snowflake Marketplace) or when you add a consumer located in another region (for a listing shared privately).
Create a listing. See Create a new listing.
Add a data product that contains only supported objects.
Set up regions or accounts to share with to start setting up auto-fulfillment:
For a listing published to the Snowflake Marketplace:
Locate the Region Availability section and select Add.
For Region availability, keep the default of All regions or select Custom regions for your listing.
For a listing shared privately, add a consumer account in a remote region.
Select your preferred refresh interval for updating the data product in remote regions.
Publish your listing or save it as a draft.
Set up auto-fulfillment for a listing that spans databases¶
Providers can create a single listing that spans databases, eliminating the need to create one combined database per listing. In this case, all listings associated with a database are auto-fulfilled together.
Workflow¶
A provider has a database (main database) that they want to share. They also have views in that database that reference objects in another database (referenced database).
The provider creates a share in the main database.
Using GRANT <privilege> … TO SHARE, the provider grants the following required privileges to the share:
The provider grants the USAGE privilege on the main database that contains the view to the share.
The provider grants the REFERENCE_USAGE privilege on the referenced database to the share.
The provider grants the USAGE privilege on the schema that contains the view to the share.
The provider grants the SELECT privilege on the view to the share.
The provider creates a listing with the share and enables auto-fulfillment for cross-region cross-cloud consumers.
For more information, see Share data from multiple databases.
Supported reference types¶
When REFERENCE_USAGE is granted on a database to a share, the following reference types are supported:
A view referencing a table or view in another database.
Tables or views with policies when these policies are stored in another database.
Tables or views with tags when these tags are stored in another database.
Note
A tag without an attached policy in a different database will only be replicated if reference usage is granted. Otherwise, replication will be skipped. See GRANT <privilege> … TO SHARE for more information. If the tag is used in tag-based masking, then the share is treated as a table or view with row-access policies.
Limitations¶
Snowflake groups listings together when refreshing the data. Setting up listings that span multiple databases can change the way listings are grouped. As a result, the following might be affected:
The listing refresh history can be missing or incorrect after update the auto-fulfillment schedule.
Setting the
refresh_schedule_overrideoption may be required. When this option is missing, a resulting error message will include the list of listings that were affected by the change in the way listings were grouped.
Usage notes¶
When setting up auto-fulfillment, if the selected and referenced databases include existing listings, then the values in the Data product refresh section default to the existing refresh schedule. As a result, changes to the auto-fulfillment refresh schedule apply to all other listings associated with this database and with the referenced database.
Examples¶
For examples on how to create a secure view that references objects and other views in one or more databases, see the Share data from multiple databases examples.
After you create a secure view, you can create a listing that includes the secure view and set up auto-fulfillment on the listing. For examples on how to create listings on the Snowflake Marketplace, see Create and publish a listing.