chore: set sample size to 100

This commit is contained in:
Stijnvandenbroek
2026-03-06 15:11:42 +00:00
parent 19f35d4eb5
commit b944d1f214

View File

@@ -1,14 +1,16 @@
-- Mart: stable random sample of Funda listings for pairwise ELO comparison. -- Mart: stable random sample of Funda listings for pairwise ELO comparison.
-- Incrementally tops up to the target sample size using deterministic ordering. -- Incrementally tops up to the target sample size using deterministic ordering.
{% set sample_size = 100 %}
select l.global_id select l.global_id
from {{ ref('funda_listings') }} as l from {{ ref('funda_listings') }} as l
{% if is_incremental() %} {% if is_incremental() %}
left join {{ this }} as s on l.global_id = s.global_id left join {{ this }} as s on l.global_id = s.global_id
where s.global_id is null where s.global_id is null
order by md5(l.global_id) order by md5(l.global_id)
limit greatest(0, 50 - (select count(*) from {{ this }})) limit greatest(0, {{ sample_size }} - (select count(*) from {{ this }}))
{% else %} {% else %}
order by md5(l.global_id) order by md5(l.global_id)
limit 50 limit {{ sample_size }}
{% endif %} {% endif %}