20.2. Copying the OLAP Data to an Analytical Table From Other Tables #

Execute the following query:

  SELECT metastore.copy_table('table_name', SQL_query);

Where:

Example 20.2. 

  SELECT copy_table('table_example', $$select * from pg_table_example$$);

Once the query is executed, pgpro_metastore performs the following actions:

  1. Verifies user privileges.

  2. Creates a new entry in the pga_snapshot metadata table.

  3. Creates a directory for results of the SQL query that are saved as Parquet files.

  4. Executes the SQL query and writes its results to Parquet files.

  5. Adds the OLAP data to the analytical table.