Skip to content

Commit

Permalink
Allow suspicious TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenetta17 authored Sep 12, 2024
1 parent caa069d commit cba5461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diamond_miner/queries/create_results_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def statement(
self, measurement_id: str, subset: IPNetwork = UNIVERSE_SUBSET
) -> str:
return f"""
SET allow_suspicious_ttl_expressions = 1
CREATE TABLE IF NOT EXISTS {results_table(measurement_id)}
(
-- Since we do not order by capture timestamp, this column compresses badly.
Expand Down Expand Up @@ -110,6 +111,6 @@ def statement(
)
ENGINE MergeTree
ORDER BY ({self.SORTING_KEY})
TTL toDateTime('2100-01-01 00:00:00') TO VOLUME '{self.storage_policy.archive_to}'
TTL {date_time(self.storage_policy.archive_on)} TO VOLUME '{self.storage_policy.archive_to}'
SETTINGS storage_policy = '{self.storage_policy.name}'
"""

0 comments on commit cba5461

Please sign in to comment.