0

I have a partitioned table in greenplum(modeled after psql), which has been partitioned with specific range of values.

Now, i have to insert the data again into the same table. New values for Partitions might overlap with existing ones. I have created alter command with new start and end dates. But, if the overlaps are there, the command fails. So, i need to create partition for each date, in order to avoid whole command failure.

Just wondering, if there is a way in greenplum to create partitions based on the inserted data automatically, just like hive does.

thanks for your help.

Srini
  • 3,334
  • 6
  • 29
  • 64

1 Answers1

1

Greenplum does not (currently) create additional partitions for data which does not fit into an existing partition.

If you have a default partition on the table it will receive all the records which do not fit into one of the specified partitions. You can then use ALTER TABLE ... SPLIT DEFAULT PARTITION (see the documentation if required) to create the new partitions for any new dates at the end of the load batch.

Bell
  • 17,907
  • 4
  • 23
  • 25