CREATE … CLONE command: Cloning databases and schemas that contain hybrid tables¶
Attention
This behavior change is in the 2024_08 bundle.
For the current status of the bundle, refer to Bundle History.
Given that hybrid tables have limited support for cloning, note the following behavior when you attempt to clone a database or a schema that contains hybrid tables:
- Before the change:
In general, CREATE DATABASE … CLONE and CREATE SCHEMA … CLONE commands silently skip hybrid tables if any exist in the specified database or schema.
CREATE DATABASE … CLONE commands do clone hybrid tables if no Time Travel parameters are specified in the command, or if an AT TIMESTAMP value is specified.
For example, the following commands succeed but skip hybrid tables:
The following command succeeds and includes hybrid tables in the cloned database:
- After the change:
CREATE SCHEMA … CLONE commands return an error if any hybrid tables exist in the specified schema. For example, the following command fails:
The error prompts you to run the command using the IGNORE HYBRID TABLES parameter. When you use this parameter, the command will create the cloned schema but skip any hybrid tables. For example:
The behavior of CREATE DATABASE … CLONE commands that do not specify Time Travel parameters does not change. For example, the following command succeeds and includes hybrid tables in the cloned database:
CREATE DATABASE … CLONE commands that use Time Travel and specify the time with the STATEMENT parameter return an error if any hybrid tables exist in the specified database. For example, the following command fails:
The error prompts you to run the command using the IGNORE HYBRID TABLES parameter. When you use this parameter, the command will create the cloned database but skip any hybrid tables. For example:
Other CREATE DATABASE … CLONE commands that specify Time Travel parameters and do not use AT TIMESTAMP on a target database that contains hybrid tables either return an error or silently skip the hybrid tables:
If the bundle is enabled (either explicitly or by default), these CREATE DATABASE … CLONE commands return an error.
If the bundle is explicitly disabled, these CREATE DATABASE … CLONE commands silently skip hybrid tables.
For more information, see Clone databases that contain hybrid tables.
Ref: 1792