How do I pass an argument to dagstermill op from a...
# ask-community
j
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
define_dagstermill_op
takes
input_defs
j
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
If you take a look at https://docs.dagster.io/integrations/dagstermill, the later example passes in
path
via input_defs
j
ahhh… thank you!!!