Skip to content

Commit

Permalink
reduce contracts_v1 dimensions (#1532)
Browse files Browse the repository at this point in the history
* reduce contracts_v1 dimensions

* make distinct

* fix: misaligned union

* filter null deployers from mart
  • Loading branch information
ccerv1 committed May 26, 2024
1 parent 546b2d7 commit accb705
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
24 changes: 22 additions & 2 deletions warehouse/dbt/models/intermediate/directory/int_contracts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ factory_deployments as (
on factories.factory_address = deployers.contract_address
)

select * from contract_deployments
select
artifact_source,
root_deployer_address,
contract_address,
contract_type,
created_by_address,
creator_type,
originating_eoa_address,
transaction_hash,
block_timestamp
from contract_deployments
union all
select * from factory_deployments
select
artifact_source,
root_deployer_address,
contract_address,
contract_type,
created_by_address,
creator_type,
originating_eoa_address,
transaction_hash,
block_timestamp
from factory_deployments
8 changes: 2 additions & 6 deletions warehouse/dbt/models/marts/directory/contracts_v1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
})
}}

select
select distinct
artifact_source,
transaction_hash,
block_timestamp,
root_deployer_address,
created_by_address,
contract_address,
originating_eoa_address,
creator_type,
contract_type
from {{ ref('int_contracts') }}
where root_deployer_address is not null

0 comments on commit accb705

Please sign in to comment.