Skip to content

Commit

Permalink
feat: add configurable TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Apr 15, 2024
1 parent b0a711d commit 5078750
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
("ASPECTS_VECTOR_DATABASE", "openedx"),
("ASPECTS_VECTOR_RAW_TRACKING_LOGS_TABLE", "_tracking"),
("ASPECTS_VECTOR_RAW_XAPI_TABLE", "xapi_events_all"),
("ASPECTS_DATA_TTL_EXPRESSION", "toDateTime(emission_time) + INTERVAL 1 YEAR"),
# Make sure LMS / CMS have event-routing-backends installed
######################
# ClickHouse Settings
Expand Down Expand Up @@ -333,7 +334,7 @@
# For now we are pulling this from github, which should allow maximum
# flexibility for forking, running branches, specific versions, etc.
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
("DBT_BRANCH", "cag/migrate-dictionaries"),
("DBT_BRANCH", "cag/ttl"),
("DBT_SSH_KEY", ""),
("DBT_STATE_DIR", "/app/aspects/dbt_state/"),
# This is the name of the database dbt will write to
Expand Down
1 change: 1 addition & 0 deletions tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pip install -r ./requirements.txt
export ASPECTS_EVENT_SINK_DATABASE={{ASPECTS_EVENT_SINK_DATABASE}}
export ASPECTS_XAPI_DATABASE={{ASPECTS_XAPI_DATABASE}}
export DBT_STATE={{ DBT_STATE_DIR }}
export ASPECTS_DATA_TTL_EXPRESSION="{{ ASPECTS_DATA_TTL_EXPRESSION }}"

echo "Installing dbt dependencies"
dbt deps --profiles-dir /app/aspects/dbt/
Expand Down

0 comments on commit 5078750

Please sign in to comment.