Skip to content

Commit 4469239

Browse files
pruoffdbeatty10
andauthored
FIX: Failing example for dbt_utils.deduplicate() in README.md (#856)
* FIX: Failing example for dbt_utils.decuplicate() in README.md * Cast to a `date` --------- Co-authored-by: Doug Beatty <[email protected]>
1 parent 72d087b commit 4469239

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -904,14 +904,16 @@ with my_cte as (
904904
select *
905905
from {{ source('my_source', 'my_table') }}
906906
where user_id = 1
907+
),
908+
deduplicated_cte as (
909+
{{ dbt_utils.deduplicate(
910+
relation='my_cte',
911+
partition_by='user_id, cast(timestamp as date)',
912+
order_by='timestamp desc',
913+
)
914+
}}
907915
)
908-
909-
{{ dbt_utils.deduplicate(
910-
relation='my_cte',
911-
partition_by='user_id, cast(timestamp as day)',
912-
order_by='timestamp desc',
913-
)
914-
}}
916+
select * from deduplicated_cte
915917
```
916918

917919
### haversine_distance ([source](macros/sql/haversine_distance.sql))

0 commit comments

Comments
 (0)