20.1. Adding the OLAP Data to an Analytical Table From Parquet Files #

Execute the following query:

  SELECT metastore.add_files('table_name', 'path_to_Parquet_files');

Where:

  • table_name: The name of the analytical table to which the OLAP data is added.

  • path_to_Parquet_files: The path to the Parquet file or to the shared directory with Parquet files from which the OLAP data is added.

    Enter a path relative to the shared directory from the pga_folder metadata table, starting with the name this directory.

    Metadata of Parquet files and the analytical table must be compatible.

Example 20.1. 

  SELECT add_files('table_example', 'folder/file.parquet');

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

  1. Verifies user privileges.

  2. Ensures that metadata of Parquet files and the analytical table are compatible.

  3. Copies Parquet files to the shared directory with Parquet files of the analytical table.

  4. Creates new entries in pga_snapshot and pga_data_file metadata tables.

  5. Updates analytical table and column statistics.