Skip to content

Commit

Permalink
Parannettu lokitus
Browse files Browse the repository at this point in the history
  • Loading branch information
Matz Rasmus committed Oct 28, 2024
1 parent ba2d01c commit e9f040d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt/macros/helpers/tempdata_cleanup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% set query = 'select raw_table from raw.completed_dbt_runs where execute order by 1' %}
{% set tables = run_query(query) %}
{% set tables_list = tables.rows %}
{{ print ('----------------------------------------------------------') }}
{% for row in tables_list %}
{% set table = row[0] %}
{{ print ('Cleaning table '+table) }}
Expand All @@ -15,5 +16,6 @@
{% set sql = 'vacuum full stg.stg_'+table %}
{% do run_query(sql) %}
{% endfor %}
{{ print ('Cleaning completed') }}
{% endif %}
{%- endmacro %}

0 comments on commit e9f040d

Please sign in to comment.