Oren Lederman
07/29/2022, 11:12 PM@asset(config_schema={"some_param": str})
def asset_with_config(context):
some_param = context.op_config["some_param"]
return some_param
@repository
def dagster_dags():
return [
asset_with_config,
]
Dagit starts just fine. As expected, I’m getting an error I try to materialize the asset:
__ASSET_JOB cannot be executed with the provided config. Please fix the following errors:
Missing required config entry "ops" at the root. Sample config for missing entry: {'ops': {'asset_with_config': {'config': {'some_param': '...'}}}}
What’s the right way to provide configuration for the asset?owen
07/29/2022, 11:17 PMOren Lederman
07/29/2022, 11:23 PMowen
07/29/2022, 11:29 PMdefine_asset_job
would be the way to do thatOren Lederman
07/29/2022, 11:35 PM@repository
def dagster_dags():
return [
asset_with_config,
define_asset_job(
"asset_with_config_job",
selection=["asset_with_config"],
description="Job to materialize asset_with_config",
config={"ops": {"asset_with_config": {"config": {"some_param": "..."}}}},
),
]
When I try to materialize it from the job window, I’m getting the following error:owen
07/29/2022, 11:37 PMOren Lederman
07/29/2022, 11:46 PMdagster run
and provided the configuration in the cli. In my new project, I’m planning to use Dagit/Dagster Cloud so I’m trying to understand how scheduler, assets, and environment-specific configuration work together. It’s slowly starting to make senseowen
07/29/2022, 11:47 PM