Caelan Schneider
02/16/2024, 2:45 PMTypeError: with_resources() missing 1 required positional argument: 'resource_defs'
Colton Padden
02/16/2024, 3:00 PMwith_resources
in this unit test. It's true that resource_defs
is a required parameter.
https://github.com/dagster-io/dagster/blob/02-16-_docs_fix_PipesLambdaClient_impor[…]/dagster_tests/core_tests/resource_tests/test_with_resources.py
def test_config():
the_asset, the_resource = get_resource_and_asset_for_config_tests()
transformed_asset = with_resources(
[the_asset],
resource_defs={"foo": the_resource, "bar": the_resource},
resource_config_by_key={"foo": {"config": "blah"}, "bar": {"config": "baz"}},
)[0]
transformed_asset(build_asset_context())
We'll make a task to update the docs. 🙏Caelan Schneider
02/16/2024, 3:07 PMDefinitions
object with configure_at_launch()
) at the asset level? I know you can do it at the job level inside the config parameter, but I have two assets inside a job that I wanted to use the same global resource for , but configured differently.Colton Padden
02/16/2024, 3:19 PMCaelan Schneider
02/16/2024, 4:18 PM