Initial publish of dbt_f2dq (f2dq) package v0.12.1.

Clean package repo for Gitea installs via packages.yml git URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
M7XBeast
2026-10-11 17:37:40 +03:00
co-authored by Cursor
commit ff096b51b5
188 changed files with 5251 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
{% macro export_alerts(start_date, end_date, alerts_path=None, monitored_path=None) %}
{% set alerts_query %}
select
type as {{ f2dq.quote_column('type') }},
model as {{ f2dq.quote_column('model') }},
message as {{ f2dq.quote_column('message') }},
value as {{ f2dq.quote_column('value') }},
{{ format_timestamp('time_window_end')}} as {{ f2dq.quote_column('time_window_end') }}
from {{ ref('f2dq_alerts') }}
where
case
when type = 'anomaly' then {{ in_date_window('time_window_end', start_date, end_date) }}
else {{ in_date_window('time_window_end', start_date, none) }}
end
order by time_window_end desc
{% endset %}
{% set query_result = run_query(alerts_query) %}
{% set alerts_file_path = alerts_path or 'target/f2dq/alerts.json' %}
{% do query_result.to_json(alerts_file_path) %}
{{ save_monitored(monitored_path) }}
{% endmacro %}