https://dagster.io/ logo
#ask-community
Title
# ask-community
j

jasono

04/20/2022, 5:38 PM
How do I pass an argument to dagstermill op from another op? Code example in the thread.
Copy code
@op(config_schema{'yymm': str})
def first_op(context):
   yymm = context.op_config["yymm"]
   ... do something here...
   return yymm

notebook_op = dm.define_dagstermill_op(
  "my_notebook",
  script_relative_path('....'),
  output_notebook_name="xxxx",
  config_schema{
    yymm:  yymm <<<<< trying to achieve something like this.
   }
)

@job( ..)
def run_job():
   notebook_op(
      first_op()
)
j

johann

04/20/2022, 6:25 PM
define_dagstermill_op
takes
input_defs
j

jasono

04/20/2022, 8:30 PM
Sorry for the newbie question, but how is the input (ie.yymm) received through input_defs passed to config_schema? Or is the variable from input_defs automatically made available in ipython notebook? like context.solid_config[“yymm”]?
j

johann

04/20/2022, 8:53 PM
If you take a look at https://docs.dagster.io/integrations/dagstermill, the later example passes in
path
via input_defs
j

jasono

04/20/2022, 8:54 PM
ahhh… thank you!!!