I don’t know if my replies in this thread will get...
# dagster-university
t
I don’t know if my replies in this thread will get carried over to linear, and your
taxi_zones
asset looks great, but it looks like Dagster is saying that your
taxi_trips
asset is missing the resource definition. Is there anything missing there that makes it not look like the
taxi_zones
asset?
j
I know this is like a million years after you asked the question but I just got bitten by this too. It looks like we need to add the resource in the project initialization.
So the
___init___.py
needs to look like:
Copy code
# fmt: off
from dagster import Definitions, load_assets_from_modules
from .assets import metrics, trips
from dagster_duckdb import DuckDBResource
import os

trip_assets = load_assets_from_modules([trips])
metric_assets = load_assets_from_modules([metrics])

defs = Definitions(
    assets=[*trip_assets, *metric_assets],
    resources={
        "database": DuckDBResource(
            database=os.getenv("DUCKDB_DATABASE"),  # required
        )
    },
)