-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add table expiry #230
base: main
Are you sure you want to change the base?
Add table expiry #230
Changes from 6 commits
0308a09
eb8fd99
515fc4a
112794f
272fcf8
1448d9f
3011d78
9497e5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,13 @@ | |
{%- set external = source_node.external -%} | ||
{%- set partitions = external.partitions -%} | ||
{%- set options = external.options -%} | ||
{%- set non_string_options = ['max_staleness'] %} | ||
{%- set hours_to_expiration = external.get('hours_to_expiration') -%} | ||
{%- set non_string_options = ['max_staleness', 'hours_to_expiration'] %} | ||
|
||
{% if options is mapping and options.get('connection_name', none) %} | ||
{% set connection_name = options.pop('connection_name') %} | ||
{% endif %} | ||
|
||
{%- set uris = [] -%} | ||
{%- if options is mapping and options.get('uris', none) -%} | ||
{%- set uris = external.options.get('uris') -%} | ||
|
@@ -46,5 +47,8 @@ | |
{%- endif -%} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{%- if hours_to_expiration -%} | ||
, expiration_timestamp = TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERVAL {{hours_to_expiration}} hour) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we integrate this into the already existing enumeration of this solution isn't very clean either though, imho. I thought to use the fancy jinja
|
||
{%- endif -%} | ||
) | ||
{% endmacro %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe this is all that is needed