Skip to content

Commit

Permalink
fix(dbt): gitcoin round namings (#2600)
Browse files Browse the repository at this point in the history
* fix: remove rounds dagster asset

* fix: round naming
  • Loading branch information
ccerv1 authored Dec 6, 2024
1 parent a8f3b0e commit e59f289
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ with unioned_funding_events as (
select * from {{ ref('stg_gitcoin__matching') }}
),

cleaned_funding_events as (
select
* except (gitcoin_round_id),
case
when
gitcoin_data_source = 'Alpha'
and round_name = 'Ethereum Infrastructure'
then 'alpha-eth-infra'
when
gitcoin_data_source = 'Alpha'
and round_name = 'Open Source Software'
then 'alpha-oss'
when
gitcoin_data_source = 'Alpha'
and round_name = 'Climate Solutions'
then 'alpha-climate'
else gitcoin_round_id
end as gitcoin_round_id
from unioned_funding_events
),

funding_events_with_round_types as (
select
*,
Expand Down Expand Up @@ -32,7 +53,7 @@ funding_events_with_round_types as (
) then 'PartnerRound'
else 'MainRound'
end as round_type
from unioned_funding_events
from cleaned_funding_events
),

labeled_funding_events as (
Expand Down Expand Up @@ -70,8 +91,8 @@ labeled_funding_events as (
when round_type = 'PartnerRound'
then concat(
round_type, ' - ',
cast(chain_id as string), ' - ',
gitcoin_round_id
gitcoin_round_id, ' - ',
cast(chain_id as string)
)
end as oso_generated_round_label
from funding_events_with_round_types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,5 @@ select
oso_project_name,
oso_display_name,
donor_address,
sum(amount_in_usd) as amount_in_usd
amount_in_usd
from {{ ref('int_gitcoin_funding_events') }}
group by
event_time,
gitcoin_data_source,
gitcoin_round_id,
round_number,
round_type,
main_round_label,
round_name,
oso_generated_round_label,
gitcoin_project_id,
project_application_title,
oso_project_id,
oso_project_name,
oso_display_name,
donor_address
4 changes: 0 additions & 4 deletions warehouse/oso_dagster/assets/gitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,5 @@
"table": "all_matching",
"write_disposition": "replace",
},
{
"table": "public.Round",
"write_disposition": "replace",
},
],
)

0 comments on commit e59f289

Please sign in to comment.