Display partition tables within new folder in the Schema Browser. Need to look into databases which supports table partitioning
1. Greenplum
2. IBM DB2 UDB
|
119 KB
|
187 KB
Lets just do this for greenplum for the time being
We already display Table Partition information in Oracle. See attached screenshot
We already display Table Partition information in Oracle. See attached screenshot
Done - Greenplum only
14.0 - SVN r33508/14.0.0-beta-81
trunk - SVN r33509/15.0.0-dev-7
Greenplum supports partitions in a hierarchical structure which is displayed in ADS' schema browser as:
- Table
- Partitions
- Subpartitions
- Subpartitions
- Subpartitions
- ...
The CREATE TABLE script below is described in the Greenplumn Database Administrator Guide 4.2, page 479. This script will create a 3-level partition hierarchy containing 594 partition tables. This fix uses this example script to verify its correctness. In ADS, you can use the information displayed in Partitions/Subpartitions nodes' detail view to verify the relationships among created partition tables. See GreenplumPartitions screenshot for details.
CREATE TABLE tableName (id int, year int, month int, day int, region text)
DISTRIBUTED BY (id)
PARTITION BY RANGE (year)
SUBPARTITION BY RANGE (month)
SUBPARTITION TEMPLATE (
START (1) END (13) EVERY (1),
DEFAULT SUBPARTITION other_months )
SUBPARTITION BY LIST (region)
SUBPARTITION TEMPLATE (
SUBPARTITION usa VALUES ('usa'),
SUBPARTITION europe VALUES ('europe'),
SUBPARTITION asia VALUES ('asia'),
DEFAULT SUBPARTITION other_regions)
( START (2002) END (2010) EVERY (1),
DEFAULT PARTITION outlying_years);
Done - Greenplum only
14.0 - SVN r33508/14.0.0-beta-81
trunk - SVN r33509/15.0.0-dev-7
Greenplum supports partitions in a hierarchical structure which is displayed in ADS' schema browser as:
- Table
- Partitions
- Subpartitions
- Subpartitions
- Subpartitions
- ...
The CREATE TABLE script below is described in the Greenplumn Database Administrator Guide 4.2, page 479. This script will create a 3-level partition hierarchy containing 594 partition tables. This fix uses this example script to verify its correctness. In ADS, you can use the information displayed in Partitions/Subpartitions nodes' detail view to verify the relationships among created partition tables. See GreenplumPartitions screenshot for details.
CREATE TABLE tableName (id int, year int, month int, day int, region text)
DISTRIBUTED BY (id)
PARTITION BY RANGE (year)
SUBPARTITION BY RANGE (month)
SUBPARTITION TEMPLATE (
START (1) END (13) EVERY (1),
DEFAULT SUBPARTITION other_months )
SUBPARTITION BY LIST (region)
SUBPARTITION TEMPLATE (
SUBPARTITION usa VALUES ('usa'),
SUBPARTITION europe VALUES ('europe'),
SUBPARTITION asia VALUES ('asia'),
DEFAULT SUBPARTITION other_regions)
( START (2002) END (2010) EVERY (1),
DEFAULT PARTITION outlying_years);
Sample script for Subpartions which worked :
CREATE TABLE sales1 (id int, year int, month int, day int, region text)
DISTRIBUTED BY (id)
PARTITION BY RANGE (year)
SUBPARTITION BY RANGE (month)
SUBPARTITION TEMPLATE (
START (1) END (13) EVERY (1),
DEFAULT SUBPARTITION other_months )
SUBPARTITION BY LIST (region)
SUBPARTITION TEMPLATE (
SUBPARTITION usa VALUES ('usa'),
SUBPARTITION europe VALUES ('europe'),
SUBPARTITION asia VALUES ('asia'),
DEFAULT SUBPARTITION other_regions )
( START (2002) END (2010) EVERY (1),
DEFAULT PARTITION outlying_years );
GO
Sample script for Subpartions which worked :
CREATE TABLE sales1 (id int, year int, month int, day int, region text)
DISTRIBUTED BY (id)
PARTITION BY RANGE (year)
SUBPARTITION BY RANGE (month)
SUBPARTITION TEMPLATE (
START (1) END (13) EVERY (1),
DEFAULT SUBPARTITION other_months )
SUBPARTITION BY LIST (region)
SUBPARTITION TEMPLATE (
SUBPARTITION usa VALUES ('usa'),
SUBPARTITION europe VALUES ('europe'),
SUBPARTITION asia VALUES ('asia'),
DEFAULT SUBPARTITION other_regions )
( START (2002) END (2010) EVERY (1),
DEFAULT PARTITION outlying_years );
GO
Issue #9713 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.0-beta-81/15.0.0-dev-7 |
No time estimate |
2 issue links |
relates to #9706
Issue #9706Partitions and SubPartitions appear as separate objects in the Schema Node |
relates to #9758
Issue #9758Include PARTITION BY on tables |
Lets just do this for greenplum for the time being