add asset key prefix
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from datetime import datetime, timezone
|
||||
from functools import partial
|
||||
from typing import Any
|
||||
|
||||
import requests_cache
|
||||
from config import APP
|
||||
from partitions import location_partitions_def
|
||||
from requests import Request
|
||||
from retry_requests import retry
|
||||
@@ -9,20 +11,13 @@ from utils import parse_coord
|
||||
|
||||
import dagster as dg
|
||||
|
||||
|
||||
@dg.asset(
|
||||
io_manager_key="json_io_manager",
|
||||
)
|
||||
def organised():
|
||||
yield dg.Output(
|
||||
{"interesting": "data"},
|
||||
metadata={"where": "something", "path_prefix": "a/b", "path_suffix": "c/d"},
|
||||
)
|
||||
asset = partial(dg.asset, key_prefix=APP)
|
||||
|
||||
|
||||
@dg.asset(
|
||||
@asset(
|
||||
io_manager_key="json_io_manager",
|
||||
partitions_def=location_partitions_def,
|
||||
name="raw",
|
||||
)
|
||||
def raw_weather(context: dg.AssetExecutionContext) -> Any:
|
||||
"""Asset to fetch raw weather data for each location."""
|
||||
|
||||
Reference in New Issue
Block a user