From 6ee14c8c8e9edca32af6bb43b80c506a508682c9 Mon Sep 17 00:00:00 2001 From: Carl Cervone <42869436+ccerv1@users.noreply.github.com> Date: Wed, 29 May 2024 12:37:03 -0400 Subject: [PATCH] fix: small fixes to rf4 eligibility filtering (#1553) --- .../dbt/models/marts/superchain/rf4_project_verification.sql | 2 +- .../dbt/models/marts/superchain/rf4_repo_stats_by_project.sql | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/warehouse/dbt/models/marts/superchain/rf4_project_verification.sql b/warehouse/dbt/models/marts/superchain/rf4_project_verification.sql index 5f106e366..c18d384d8 100644 --- a/warehouse/dbt/models/marts/superchain/rf4_project_verification.sql +++ b/warehouse/dbt/models/marts/superchain/rf4_project_verification.sql @@ -63,7 +63,7 @@ checks as ( unique_addresses, date_first_transaction, days_with_onchain_activity_in_range, - ARRAY_LENGTH(eligible_repos) >= 1 as check_oss_requirements, + COALESCE(ARRAY_LENGTH(eligible_repos), 0) >= 1 as check_oss_requirements, unique_addresses >= 420 as check_unique_addresses, date_first_transaction < '2024-03-01' as check_date_first_transaction, days_with_onchain_activity_in_range >= 10 diff --git a/warehouse/dbt/models/marts/superchain/rf4_repo_stats_by_project.sql b/warehouse/dbt/models/marts/superchain/rf4_repo_stats_by_project.sql index 66baee2fe..48441fe15 100644 --- a/warehouse/dbt/models/marts/superchain/rf4_repo_stats_by_project.sql +++ b/warehouse/dbt/models/marts/superchain/rf4_repo_stats_by_project.sql @@ -64,5 +64,4 @@ left join {{ ref('projects_v1') }} left join {{ ref('projects_by_collection_v1') }} on repo_snapshot.project_id = projects_by_collection_v1.project_id where - projects_by_collection_v1.collection_name = 'op-onchain' - and repo_snapshot.license_type != 'Unspecified' + repo_snapshot.license_type != 'Unspecified'