16.3. Creating a Postgres Pro View From an Analytical Table #

Important

Postgres Pro views can be recreated only during periods of zero user activity to prevent potential data loss.

Execute the following query:

  SELECT metastore.create_view('table_name', 'Postgres_Pro_schema_name');

Where:

Example 16.4. 

  SELECT metastore.create_view('table_example');

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

  1. Verifies user privileges.

  2. Receives metadata of the analytical table and the path to the shared directory.

  3. Generates the CREATE VIEW query with the data source being the result of calling the read_parquet() function.

  4. Executes the CREATE VIEW query.

  5. Grants privileges to the Postgres Pro view.

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