Execute the following query:
SELECT metastore.copy_table('table_name', SQL_query);
Where:
table_name: The name of the
analytical table
to which the OLAP data is copied.
SQL_query: The SQL query that determines
which OLAP data is copied, for example,
SELECT * FROM my_pgtable.
The SQL query must be a single valid SELECT
statement. The UNION operation is not supported.
Example 20.2.
SELECT copy_table('table_example', $$select * from pg_table_example$$);
Once the query is executed, pgpro_metastore performs the following actions:
Verifies user privileges.
Creates a new entry in the
pga_snapshot
metadata table.
Creates a directory for results of the SQL query that are saved as Parquet files.
Executes the SQL query and writes its results to Parquet files.