Skip to content

Commit 3236e58

Browse files
committed
fix: debug pour que dbt_copile fonctionne (historical_dim_vessels-> UTF-8, corrections de références de modèles dans quelques fichiers et d'un bloc config vide dans _stg_schema.yml | fix: désactivation de la clause de filtre temporel sur la jointure dans itm_vessel_last_raw_position
1 parent 7161230 commit 3236e58

File tree

5 files changed

+64
-65
lines changed

5 files changed

+64
-65
lines changed

backend/dbt_trawlwatch/models/itm/positions/itm_vessel_last_raw_position.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
with
1212

13-
dim_vessels as (
13+
dim_mmsi as (
1414
select
1515
vessel_id,
1616
dim_mmsi_mmsi,
@@ -34,9 +34,9 @@ last_vessel_raw_positions as (
3434
last(position_course order by created_at, position_id) as position_course__raw_last,
3535
last(position_rot order by created_at, position_id) as position_rot__raw_last
3636

37-
from dim_vessels
38-
left join {{ source('spire','spire_ais_data') }} spire on dim_vessels.dim_mmsi_mmsi = spire.position_mmsi
39-
and utils.safe_between(spire.position_timestamp, dim_vessels.dim_mmsi_start_date, dim_vessels.dim_mmsi_end_date)
37+
from dim_mmsi
38+
left join {{ source('spire','spire_ais_data') }} spire on dim_mmsi.dim_mmsi_mmsi = spire.position_mmsi
39+
-- and utils.safe_between(spire.position_timestamp, dim_mmsi.dim_mmsi_start_date, dim_mmsi.dim_mmsi_end_date)
4040
where spire.position_timestamp is not null
4141
group by vessel_id
4242
)

backend/dbt_trawlwatch/models/staging/_stg_schema.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ models:
44
### PORTS
55
- name: seed_dim_ports
66
description: "Staged model from seed for ports data, used for staging and analysis"
7-
config:
87
columns:
98
- name: port_id
109
description: "Unique identifier for each port (based on UN/LOCODE)"

backend/dbt_trawlwatch/models/staging/seed_historical_dim_mmsi.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ select
1818
'HISTORICAL'::varchar as dim_mmsi_origin,
1919
details as dim_mmsi_details,
2020
now() as dim_mmsi_created_at
21-
from {{ ref('dim_mmsi') }}
21+
from {{ ref('historical_dim_mmsi') }}
2222

2323
where vessel_id is not null

backend/dbt_trawlwatch/models/staging/seed_historical_dim_vessels.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ select
5151
) as dim_vessel_details,
5252

5353
now() as dim_vessel_created_at
54-
from {{ ref('historical_vessels_table') }} as historical_vessels -- A adapter quand la table de référence changera
54+
from {{ ref('historical_dim_vessels') }} as historical_vessels -- A adapter quand la table de référence changera
5555
order by vessel_id

0 commit comments

Comments
 (0)