From b944d1f2144b641da8a8ffd4bf0e8e801bd06240 Mon Sep 17 00:00:00 2001 From: Stijnvandenbroek Date: Fri, 6 Mar 2026 15:11:42 +0000 Subject: [PATCH] chore: set sample size to 100 --- dbt/models/marts/elo_sample_listings.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbt/models/marts/elo_sample_listings.sql b/dbt/models/marts/elo_sample_listings.sql index 3828310..5e136ec 100644 --- a/dbt/models/marts/elo_sample_listings.sql +++ b/dbt/models/marts/elo_sample_listings.sql @@ -1,14 +1,16 @@ -- Mart: stable random sample of Funda listings for pairwise ELO comparison. -- Incrementally tops up to the target sample size using deterministic ordering. +{% set sample_size = 100 %} + select l.global_id from {{ ref('funda_listings') }} as l {% if is_incremental() %} left join {{ this }} as s on l.global_id = s.global_id where s.global_id is null order by md5(l.global_id) - limit greatest(0, 50 - (select count(*) from {{ this }})) + limit greatest(0, {{ sample_size }} - (select count(*) from {{ this }})) {% else %} order by md5(l.global_id) - limit 50 + limit {{ sample_size }} {% endif %}