From 70c8b733807b896723e0243286e127bfd88c3f85 Mon Sep 17 00:00:00 2001 From: Diego Quintana Date: Wed, 3 Jul 2024 12:54:31 +0200 Subject: [PATCH] fix: make 5min view cover three months instead of one month (et/somenergia-jardiner!150) * fix: make 5min view cover three months instead of one month Required by gda because they wanted to check older data when dset has or fixes gaps in the data Ff this is enough, then there is nothing else to do. Otherwise we should evaluate making this view incremental --- .../models/jardiner/marts/dm_metrics_production_5min.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_jardiner/models/jardiner/marts/dm_metrics_production_5min.sql b/dbt_jardiner/models/jardiner/marts/dm_metrics_production_5min.sql index 9bcb271..f08a744 100644 --- a/dbt_jardiner/models/jardiner/marts/dm_metrics_production_5min.sql +++ b/dbt_jardiner/models/jardiner/marts/dm_metrics_production_5min.sql @@ -15,5 +15,5 @@ select from {{ ref("int_dset_responses__values_incremental") }} where device_type in ('inverter', 'sensor', 'string', 'meter') - and ts > (now() at time zone 'Europe/Madrid')::date - interval '30 days' + and ts > (now() at time zone 'Europe/Madrid')::date - interval '3 months' order by ts desc, plant_name asc