Skip to content

Commit

Permalink
more bounded window based partitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs committed Sep 24, 2024
1 parent 2e1575c commit 8ac7460
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,22 +523,20 @@ def validate_fides_collection_key(value: str) -> str:
FidesCollectionKey = Annotated[str, AfterValidator(validate_fides_collection_key)]


class PartitionType(Enum):
RANGE = "range"
TIME = "time"
class UserDefinedPartitionWindow(BaseModel):
"""Defines a user-defined partition window"""


class TimePartitionInterval(Enum):
HOUR = "hour"
DAY = "day"
MONTH = "month"
YEAR = "year"
start: str
end: str
start_inclusive: bool = True
end_inclusive: bool = True


class PartitionSpecification(BaseModel):
"""Defines partition spec for a collection"""

where_clauses: Optional[List[str]] = None
field: str
windows: Optional[List[UserDefinedPartitionWindow]] = None


class CollectionMeta(BaseModel):
Expand Down

0 comments on commit 8ac7460

Please sign in to comment.