Skip to content

Commit

Permalink
add metal data sources (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenac95 authored Jun 2, 2024
1 parent e677f03 commit f3ab3f2
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions warehouse/oso_dagster/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,53 @@ def _generated_dbt_assets(context: AssetExecutionContext, **kwargs):
),
)

metal_blocks = goldsky_asset(
GoldskyConfig(
key_prefix="metal",
name="blocks",
source_name="metal-blocks",
project_id="opensource-observer",
destination_table_name="metal_blocks",
working_destination_dataset_name="oso_raw_sources",
destination_dataset_name="superchain",
partition_column_name="timestamp",
partition_column_transform=lambda c: f"TIMESTAMP_SECONDS(`{c}`)",
checks=[blocks_checks()],
),
)

metal_transactions = goldsky_asset(
GoldskyConfig(
key_prefix="metal",
name="transactions",
source_name="metal-receipt_transactions",
project_id="opensource-observer",
destination_table_name="metal_transactions",
working_destination_dataset_name="oso_raw_sources",
destination_dataset_name="superchain",
partition_column_name="block_timestamp",
partition_column_transform=lambda c: f"TIMESTAMP_SECONDS(`{c}`)",
schema_overrides=[SchemaField(name="value", field_type="BYTES")],
checks=[transactions_checks()],
),
)


metal_traces = goldsky_asset(
GoldskyConfig(
key_prefix="metal",
name="traces",
source_name="metal-traces",
project_id="opensource-observer",
destination_table_name="metal_traces",
working_destination_dataset_name="oso_raw_sources",
destination_dataset_name="superchain",
partition_column_name="block_timestamp",
partition_column_transform=lambda c: f"TIMESTAMP_SECONDS(`{c}`)",
checks=[traces_checks()],
),
)

optimism_traces = goldsky_asset(
GoldskyConfig(
key_prefix="optimism",
Expand Down

0 comments on commit f3ab3f2

Please sign in to comment.