How to specify a dict config #8545
Unanswered
Replies: 1 comment
-
You can use from dagster import Map
@op(config_schema={"dict_config ": Field(Map({str: int}})))
def my_op(context):
print(context.op_config.items()) API doc: https://docs.dagster.io/_apidocs/config#dagster.Map |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do you specify the following schema configuration on an op():
config:
dict_config: { 'key1': { 'subkey1': 'value1', 'subkey2': 'value2' },
'key2': { 'subkey1': 'value1', 'subkey2': 'value2' } }
where key1 and key2 are user specific and not known. Looks like Selector does this but only allows one entry to be configured in yaml file. Looks like I can just call out a dict() but then the subdict is not validated, right?
The question was originally asked in Dagster Slack.
Beta Was this translation helpful? Give feedback.
All reactions