Aaron T
05/09/2023, 3:21 PMGuy McCombe
05/09/2023, 4:05 PMDefinitions
obj. In this way I can import the generics from that directory/package for use across each code location. This pattern has worked out pretty well for us so far :daggy-love:Clayton Casey
05/09/2023, 4:53 PMsean
05/09/2023, 6:53 PMI have an op that converts a list of dictionaries to a data frame, and can be used by anything that needs it. Does it make sense for that to be an op?This really depends on how you intend to use this and how your graphs are structured. If you use a list of dicts as a stored intermediate representation, then it could make sense, if youโre generally passing dataframes between ops, then it should probably just be a function you invoke inside ops and or an IO manager.
Guy McCombe
05/10/2023, 6:53 AMrvvup
โโโ __init__.py
โโโ data
โ โโโ __init__.py
โ โโโ assets
โ โโโ dbt_project
โ โโโ jobs
โ โโโ ops
โ โโโ resources
โ โโโ schedules
โ โโโ utils
โโโ reporting
โ โโโ __init__.py
โ โโโ assets
โ โโโ jobs
โ โโโ resources
โ โโโ schedules
โโโ sales
โ โโโ __init__.py
โ โโโ assets
โ โโโ jobs
โ โโโ ops
โ โโโ resources
โโโ universal
โโโ __init__.py
โโโ resources
โโโ sensors
โโโ utils
Aaron T
05/11/2023, 1:37 PMGuy McCombe
05/11/2023, 1:40 PM/rvvup/__init__.py
is blank, but thereโs an __init__
in each department directory (sales, reporting, etc.) which contains the Definitions
for that code from dagster import Definitions
from dagster import load_assets_from_package_module
from rvvup.data import assets
from <http://rvvup.data.jobs|rvvup.data.jobs> import ALL_JOBS
from rvvup.data.resources import RESOURCES
from rvvup.data.schedules import ALL_SCHEDULES
from rvvup.universal.sensors import ALL_SENSORS
from rvvup.universal.utils.constants import ENV
ALL_ASSETS = load_assets_from_package_module(assets)
defs = Definitions(
assets=ALL_ASSETS,
schedules=ALL_SCHEDULES,
sensors=ALL_SENSORS,
jobs=ALL_JOBS,
resources=RESOURCES[ENV],
)
load_from:
- python_package: rvvup.data
- python_package: rvvup.sales
- python_package: rvvup.reporting
Aaron T
05/11/2023, 1:42 PMGuy McCombe
05/11/2023, 1:44 PMAaron T
05/11/2023, 1:44 PMGuy McCombe
05/11/2023, 1:45 PM