Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add configurable TTL #723

Merged
merged 1 commit into from
Apr 16, 2024
Merged

feat: add configurable TTL #723

merged 1 commit into from
Apr 16, 2024

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Apr 15, 2024

Description

This PR creates a setting: ASPECTS_DATA_TTL_EXPRESSION to configure the TTL of partitioned tables in aspects-dbt.

Example:

1. │ CREATE TABLE xapi.completion_events
(
    `event_id` UUID,
    `emission_time` DateTime,
    `actor_id` String,
    `object_id` String,
    `course_key` String,
    `org` String,
    `verb_id` String,
    `progress_percent` String
)
ENGINE = ReplacingMergeTree
PARTITION BY toYYYYMM(emission_time)
PRIMARY KEY (org, course_key, verb_id)
ORDER BY (org, course_key, verb_id, emission_time, actor_id, object_id, event_id)
TTL toDateTime(emission_time) + toIntervalYear(1)
SETTINGS replicated_deduplication_window = 0, index_granularity = 8192

@Ian2012 Ian2012 requested a review from bmtcril April 15, 2024 18:00
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 15, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @Ian2012! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@Ian2012 Ian2012 merged commit debffd9 into cag/dictionaries Apr 16, 2024
8 checks passed
@Ian2012 Ian2012 deleted the cag/ttl branch April 16, 2024 16:46
@openedx-webhooks
Copy link

@Ian2012 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants