Add endpoints to glue for deleting partitions

Specifically add glue.delete_partition and glue.batch_delete_partition.
This commit is contained in:
Don Kuntz 2019-06-11 14:14:28 -05:00
commit df2d2ac6b4
3 changed files with 151 additions and 0 deletions

View file

@ -138,6 +138,12 @@ class FakeTable(BaseModel):
raise PartitionAlreadyExistsException()
self.partitions[key] = partition
def delete_partition(self, values):
try:
del self.partitions[str(values)]
except KeyError:
raise PartitionNotFoundException()
class FakePartition(BaseModel):
def __init__(self, database_name, table_name, partiton_input):