DUMP_PROJECTION_PARTITION_KEYS
Dumps the partition keys of the specified projection.
Syntax
DUMP_PROJECTION_PARTITION_KEYS( '[[database.]schema.]projection-name')
Parameters
| [database.]schema |
Specifies a schema, by default myschema.thisDbObject If you specify a database, it must be the current database. |
| projection‑name |
The projection name. |
Privileges
- SELECT privilege on table
- USAGE privileges on schema
Example
The following statements create the table and projection online_sales.online_sales_fact and online_sales.online_sales_fact_unseg_p, respectively, and partitions table data by the column call_center_key:
=> CREATE TABLE online_sales.online_sales_fact
(
sale_date_key int NOT NULL,
ship_date_key int NOT NULL,
product_key int NOT NULL,
product_version int NOT NULL,
customer_key int NOT NULL,
call_center_key int NOT NULL,
online_page_key int NOT NULL,
shipping_key int NOT NULL,
warehouse_key int NOT NULL,
promotion_key int NOT NULL,
pos_transaction_number int NOT NULL,
sales_quantity int,
sales_dollar_amount float,
ship_dollar_amount float,
net_dollar_amount float,
cost_dollar_amount float,
gross_profit_dollar_amount float,
transaction_type varchar(16)
)
PARTITION BY (online_sales_fact.call_center_key);
=> CREATE PROJECTION online_sales.online_sales_fact_unseg_p AS SELECT * from online_sales.online_sales_fact unsegmented all nodes;
The following DUMP_PROJECTION_PARTITION_KEYS statement dumps the partition key from the projection online_sales.online_sales_fact_unseg_p:
=> SELECT DUMP_PROJECTION_PARTITION_KEYS('online_sales.online_sales_fact_unseg_p');
Partition keys on node v_vmart_node0001
Projection 'online_sales_fact_unseg_p'
Storage [ROS container]
No of partition keys: 1
Partition keys: 200
Storage [ROS container]
No of partition keys: 1
Partition keys: 199
...
Storage [ROS container]
No of partition keys: 1
Partition keys: 2
Storage [ROS container]
No of partition keys: 1
Partition keys: 1
Partition keys on node v_vmart_node0002
Projection 'online_sales_fact_unseg_p'
Storage [ROS container]
No of partition keys: 1
Partition keys: 200
Storage [ROS container]
No of partition keys: 1
Partition keys: 199
...
(1 row)
See Also
- Partitioning Tables in the Administrator's Guide
DUMP_PARTITION_KEYSDUMP_TABLE_PARTITION_KEYSPARTITION_PROJECTIONPARTITION_TABLE