The following steps below demonstrate the process of moving a table from one schema to another. In the example SQL statements provided, replace
target_schema with your own values.
- Create a duplicate of a table from your source schema to your target schema.
CREATE TABLE "target_schema"."my_table" (LIKE "source_schema"."my_table");
- Populate the new table by moving data from the existing source table.
ALTER TABLE "target_schema"."my_table" APPEND FROM "source_schema"."my_table";
- Drop the source table.
DROP TABLE "source_schema"."my_table";
Moving a table to a different schema will not change the destination schema of a Panoply data source or external integrations.
In Panoply, you cannot change the schema of a data source that has already collected data. If you really need to use a different schema, just create a new data source similar to your old one, and then configure it to use a different schema to import your data to.