Configuração do preenchimento automático¶
Esta seção descreve como configurar o Preenchimento automático entre nuvens (preenchimento automático) para produtos de dados de compartilhamento seguro e produtos de dados de pacotes de aplicativos. Ela também descreve como configurar o preenchimento automático em nível de objeto para uma listagem.
Você deve adicionar um produto de dados à sua listagem antes de configurar o preenchimento automático. Além disso, as etapas para configurar o preenchimento automático são diferentes dependendo do produto de dados que você oferece e de como você disponibiliza sua listagem.
Configuração do preenchimento automático em nível de objeto¶
Se você quiser transferir automaticamente o produto de dados associado à sua listagem para outras regiões do Snowflake, configure o preenchimento automático. Você também pode usar o preenchimento automático SUB_DATABASE e optar por preencher apenas as tabelas e exibições em um produto de dados para uma região remota usando o preenchimento automático. Isso pode ajudar a reduzir custos e a gerenciar seu produto de dados preenchido automaticamente.
As etapas abaixo descrevem como configurar o preenchimento automático em nível de objeto para uma listagem. Como parte de um fluxo de trabalho típico, você configura o preenchimento automático em nível de objeto ao configurar a disponibilidade da região (para uma listagem publicada no Snowflake Marketplace) ou quando você adiciona um consumidor localizado em outra região (para uma listagem compartilhada de forma privada).
Criar uma listagem. Consulte Criar uma nova listagem.
Ative um produto de dados que contenha apenas objetos compatíveis.
Configure regiões ou contas para compartilhar e começar a configurar o preenchimento automático:
Para uma listagem publicada no Snowflake Marketplace:
Localize a seção Region Availability e selecione Add.
Para Region availability, mantenha o padrão de All regions ou selecione Custom regions para sua listagem.
Para uma listagem compartilhada de forma privada, adicione uma conta de consumidor em uma região remota.
Selecione o intervalo de atualização de sua preferência para atualizar o produto de dados em regiões remotas.
Publique sua listagem ou salve-a como um rascunho.
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 <privilégio> … 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 Compartilhamento de dados de vários bancos de dados.
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.
Nota
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 <privilégio> … 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 order that the 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.