Brian Pohl
10/13/2022, 3:57 PMops:
execute_mi_sales_zip_30_lag_est_snowpark:
config: {'inputs': {'models_ran': True}}
run_metrics_models:
config: {'inputs': {'lag_365_est': True, 'lag_90_est': True}}
yuhan
10/13/2022, 9:18 PMops:
execute_mi_sales_zip_30_lag_est_snowpark:
config:
inputs:
models_ran: True
run_metrics_models:
config:
inputs:
lag_365_est: True
lag_90_est: True
rex
10/13/2022, 9:20 PMI would suggest a different course of action here. In Dagster, there is a native abstraction to execute subsets of the job. So rather than editing the configuration of your ops to determine whether they should be executed, you can configure the job subset.
https://docs.dagster.io/concepts/ops-jobs-graphs/job-execution#executing-job-subsets
Re-execution from failure is a common pattern. Again, Dagster has this re-execution mode built in:
https://docs.dagster.io/guides/dagster/re-execution#re-execution-in-dagit
yuhan
10/13/2022, 9:22 PMconfig
field which was why you’re seeing the config error.
this should work
ops:
execute_mi_sales_zip_30_lag_est_snowpark:
inputs:
models_ran: True
run_metrics_models:
inputs:
lag_365_est: True
lag_90_est: True
Brian Pohl
10/13/2022, 9:24 PMyuhan
10/13/2022, 9:33 PMrun_metrics_models
are satisfied, i.e. its upstream ops execute_mi_sales_..
were all selected to launch. so there’s no need to provide the input values via the Launchpad, and instead, it will load the inputs from the execut_mi_sales_
outputsran
indicator of whether the upstream has run.Brian Pohl
10/13/2022, 9:39 PMyuhan
10/15/2022, 12:29 AMinputs
field.
when i selected just one of the upstream, i was able to see the config error which prompt me to add the inputs
field.
here’s the code i tried with:
from dagster import job, op
@op
def upstream_1():
return True
@op
def upstream_2():
return True
@op
def upstream_3():
return True
@op
def run_metrics_models(in_1, in_2, in3):
return True
@op
def create_sql_export(in_):
return True
@job
def my_job():
create_sql_export(run_metrics_models(upstream_1(), upstream_2(), upstream_3()))
Brian Pohl
11/02/2022, 8:19 PMdynamo_import_0
, dynamo_import_1
, and dynamo_import_2
, which are all downstream of create_sql_export
.
I am trying to run these 4 steps, and if I put nothing in the config, I do get an error saying i need to put something at ops:create_sql_export:inputs
(first pic).
however, if i actually do that, i get an error about how inputs
is not expected (second pic)
inputs
is both unexpected and required 😅"create_sql_export"++
dagster
Python library because I hit some dependency issues. I'm currently using 1.0.2 in the Dockerfile. here's my full list of Python requirements:
agate==1.6.3
dagster==1.0.2
dagster-cloud==1.0.2
dagster_aws==0.16.2
dagster_dbt==0.16.2
dagster_k8s==0.16.2
dagster_snowflake==0.16.2
dagster_pandas==0.16.2
dbt-core==1.2.0
dbt-snowflake==1.2.0
numpy==1.23.3
pandas==1.4.4
pandasql==0.7.3
snowflake-connector-python==2.7.12
snowflake-connector-python[pandas]==2.7.12
snowflake-snowpark-python==0.7.0
statsmodels==0.13.2
daniel
11/10/2022, 6:39 PMBrian Pohl
11/10/2022, 6:45 PM