Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dbt): gitcoin round namings #2600

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
},
],
)
Loading