Copy Testcase Statements
The COPY TESTCASE statement enables exporting and importing table or view metadata for testing and debugging in a local cluster. It supports metadata export to a file and subsequent loading into a target cluster, facilitating query planning and analysis.
The
COPY TESTCASE
statement allows users to export table or view metadata
involved in a query, allowing developers to replay the metadata in a local cluster for
testing and debugging purposes.- Exporting Metadata to a File
- Use the following syntax to dump
metadata:
COPY TESTCASE TO <hdfs/s3 dirpath> <query stmt>
- Loading Metadata into a Target Cluster
- To load the previously exported metadata, use the following
syntax:
COPY TESTCASE FROM <hdfs/s3 testcase file path>
- Using the Imported Metadata
- To use the imported metadata in query planning, enable the planner testcase
mode:
SET PLANNER_TESTCASE_MODE=true;