Can you do `overrides` with `@subdag` or would `co...
# hamilton-help
s
Can you do
overrides
with
@subdag
or would
config
work the same here or?
t
Let's you have
Copy code
# feature_modules.py
def feature_a(...):

def feature_b(...)

# main_dag.py
@subdag(
    feature_modules,
    inputs={"path": source("source_path")},
    config={}
)
def feature_engineering(feature_df: pd.DataFrame) -> pd.DataFrame:
    return feature_df
Then, the nodes of the subdag will be namespaced with `feature_engineering.NODE_NAME`which allows you to use overrides for
feature_a
via
Copy code
dr.execute(
  ["feature_engineering],
  overrides={
    "feature_engineering.feature_a": ...
  }
)
Does this help?
s
This makes sense. I ended up going with Hamilton within Hamilton so that I could encapsulate it how I wanted so the main driver didn’t have to know
👍 1