Example E.1.
Executing the add_storage ETL operation
creates a new storage in the
pga_storage
metadata table.
For this update, a new snapshot is created in the
pga_snapshot
metadata table.
The created entries are associated using the
begin_snapshot value of the
pga_snapshot metadata table.
The current schema_version
and next_catalog_id values of the
pga_snapshot metadata table
are increased by one since the metadata was updated, and new entries
were created in metadata tables.
Example E.2.
Executing the remove_storage ETL operation
deactivates a storage from the
pga_storage metadata table but does not
delete it physically. For this update, a new snapshot is created in
the pga_snapshot metadata table.
The created entries are associated using the
end_snapshot value of the
pga_snapshot metadata table.
The current schema_version value
of the pga_snapshot metadata table is
increased by one, and the next_catalog_id
value remains the same, since the metadata was updated, but no new
entries were created in metadata tables.
Example E.3.
Executing the add_table ETL operation creates
a new analytical table in the
pga_table
metadata table and N new columns in the
pga_column
metadata table. For these updates, N+1 new snapshots are created in
the pga_snapshot metadata table. The created
entries are associated using the
begin_snapshot value of the
pga_snapshot metadata table.
The current schema_version value of the
pga_snapshot metadata table is increased
by one, and the next_catalog_id value
is increased by N+1 since the metadata was updated, and new entries
were created in metadata tables. The
schema_version value is only increased
by one because all updates were made in a single ETL operation.
The next_catalog_id+1
value is used as the table_id value
for the new analytical table in the pga_table
metadata table, whereas
next_catalog_id+1+N values are used as
column_id values for new columns in
the pga_column metadata table.
Example E.4.
Executing the add_files ETL operation
creates one or multiple Parquet files in the
pga_data_file
metadata table. For this update, N new snapshots are created in the
pga_snapshot metadata table. The created entries
are associated using the begin_snapshot value
of the pga_snapshot metadata table.
The current schema_version
and next_catalog_id values of the
pga_snapshot metadata table remain the
same since the metadata was not updated, and no new
entries were created in metadata tables.
The next_file_id value of the
pga_snapshot metadata table is increased
by one, and next_file_id+N values
are used as data_file_id values
for new Parquet files in the pga_data_file
metadata table.