-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hey all,
Since DeltaTableWriter doesn't currently support specifying clustering columns directly, would it be feasible to potentially extend the DeltaTableWriter class? Something like the following:
from koheesio.steps.writers import DeltaTableWriter
from typing import List, Optional
class ClusteredDeltaTableWriter(DeltaTableWriter):
cluster_by: Optional[List[str]] = None
def execute(self) -> None:
super().execute()
# add clustering
if self.cluster_by:
from delta.tables import DeltaTable
delta_table = DeltaTable.forPath(self.spark, self.path)
delta_table.alter().addClusterBy(self.cluster_by)I appreciate it everyone.
Sincerely,
Michael Mendy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels