clone_schema()#

relationalai.app
#clone_schema(<target_schema_name>, <source_schema_name>)

Clones an existing RelationalAI (RAI) schema to a new schema within the RAI Native App for Snowflake. Snapshots of the source schema’s data are cloned, but CDC streams are not. The target schema gets a new set of schema roles. Requires the schema_admin application role.

Parameters#

NameTypeDescription
<target_schema_name>STRINGThe name of the new schema to create (case-sensitive).
<source_schema_name>STRINGThe name of the existing schema to clone (case-sensitive).

Example#

Use clone_schema() to clone an existing RAI schema into a new schema:

#-- NOTE: RAI schema names are case-sensitive
CALL relationalai.app.clone_schema('my_target_schema', 'my_source_schema');

See Also#