Copy arctic-extract models between databases, schemas, and accounts¶
This topic explains how to copy fine-tuned arctic-extract models between databases or schemas in the same account or between different accounts in the same organization.
For example, you might want to copy a model from a development account to a production account.
Copy models between databases and/or schemas within an account¶
Create the model from the source model using the role that created the source model:
Tip
To list the versions in a model, use SHOW VERSIONS IN MODEL.
Optional: Add another version of the model:
To enable the
prod_rolerole to use the copied model, grant the OWNERSHIP privilege on the model to that role:
Copy models between accounts¶
You can replicate a model from a source account to one or more target accounts in the same organization. For more information about replication, see Introduction to replication and failover across multiple accounts.
To replicate the model from a source account to a target account, you need to create a replication group in the source account to enable replication of the database in which the model was created to a target account, and set up the production user role.
Note
You must be a user with the ACCOUNTADMIN role to create a replication group and to set up the production user role.
Replicate the database in which the model was created¶
Create a primary replication group in the source account:
Create a secondary replication group in a target account as a replica of the primary replication group in the source account:
Refresh the database in the target account from the source account:
Optional: Specify the schedule for refreshing the secondary replication group so that the account is synchronized automatically every 10 minutes:
Set up the production user role¶
To ensure that the user working on the target production account (for example, a user with the prod_role role) can use the replicated model, follow these steps:
Grant the USAGE privilege on the source database and schema, and ownership on all models in that schema, to the
prod_rolerole:Optional: Grant ownership on all the future models that will be replicated:
After you grant the required privileges, a user with the prod_role role must follow these steps:
Create the model from the source model:
Optional: Add another version of the model:
Note
The model in the target schema is a separate model object from the model in the replicated database. New versions are not copied automatically; you must add each version using ALTER MODEL … ADD VERSION.