https://dagster.io/ logo
#dagster-support
Title
# dagster-support
j

Jeffery

09/15/2022, 9:24 AM
Hi team, Is there a way to pass hard coded data within a job to an op, for DRY reason e.g. loading df to db for 2 different tables with load_df op load_df(df = df1, tbl = <hard-coded-value-1>) load_df(df = df2, tbl = <hard-coded-value-2>)
s

Sanidhya Singh

09/15/2022, 9:43 AM
How about config_schema with a default value?
j

Jeffery

09/15/2022, 11:31 AM
Hi Sanidhya, I looked into it as well, the config is per job, however I will need run 2 diff config per op under the same job
z

Zach

09/15/2022, 3:06 PM
or you could alias your load_df ops and then you can set different op confings in your run config:
Copy code
@graph
def loading_graph():
    load_df.alias("load_df1")(df=df1)
    load_df.alias("load_df2")(df=df2)
j

Jeffery

09/15/2022, 6:36 PM
Hey Zach, your second solutions works perfectly, thanks so much for the suggestion!
🎉 1