Skip to content

Commit

Permalink
Update return types to AssetsDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneselvans committed Nov 26, 2024
1 parent 2596aa3 commit 50f851c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/pudl/extract/ferc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,17 @@ def aggregate_table_frames(


# DAGSTER ASSETS
def create_raw_ferc1_assets() -> list[AssetSpec]:
def create_raw_ferc1_assets() -> AssetsDefinition:
"""Create asset specifications for raw ferc1 tables.
AssetSpec objects allow you to access assets that are generated elsewhere. In our
case, the xbrl and dbf database are created in a separate dagster Definition.
Define assets for the raw FERC 1 tables, using AssetSpecs since they are external to
the main PUDL DAG, as the DBF and XBRL databases are created in a separate dagster
Definition.
Returns:
A list of ferc1 AssetSpecs
AssetsDefinition containing all the raw FERC 1 assets.
"""
# Deduplicate the table names because f1_elctrc_erg_acct feeds into multiple pudl tables.
# Deduplicate table names since f1_elctrc_erg_acct feeds into multiple pudl tables.
dbfs = (v["dbf"] for v in TABLE_NAME_MAP_FERC1.values())
flattened_dbfs = chain.from_iterable(
x if isinstance(x, list) else [x] for x in dbfs
Expand Down

0 comments on commit 50f851c

Please sign in to comment.