Skip to content

Commit cc0d305

Browse files
committed
fix filtre sur base
1 parent 12b3b8f commit cc0d305

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

dbt/models/base/ban/base_ban_adresses.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ SELECT
1919
lat as latitude,
2020
lon as longitude
2121
FROM {{ source('ban', 'clone_ban_adresses_in_use') }}
22-
WHERE code_postal NOT IN ('',NULL)
22+
WHERE code_postal IS NOT NULL AND code_postal != ''
2323
ORDER BY code_postal ASC

dbt/models/intermediate/ban/int_ban_adresses.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
post_hook = partial indexes on high-cardinality columns only for NOT NULL
3+
so we can still speed up the JOINS/FILTERS
4+
*/
15
{{
26
config(
37
materialized = 'table',
@@ -14,4 +18,5 @@
1418
}}
1519

1620

17-
SELECT * FROM {{ ref('base_ban_adresses') }}
21+
SELECT *
22+
FROM {{ ref('base_ban_adresses') }}

0 commit comments

Comments
 (0)