Domantas M
07/27/2023, 10:02 AM@op
.
I'm doing that with configured()
approach.
It seems it is impossible to change TestClass values by using Dagster UI configuration:
execution:
config:
multiprocess:
max_concurrent: 0
retries:
enabled: {}
loggers: {}
ops:
test_case:
config:
test_param2: test
test_param3: test
resources:
io_manager: {}
s3: {}
In the run only test_param1
value is changed, test_param2, test_param3 in this case remains defaults.
Code sample:
from datetime import datetime
from dagster import job, Config, op
class TestClass(Config):
test_param1: str = "1"
test_param2: str = "2"
test_param3: str = "3"
@op
def test_op(context, config: TestClass) -> None:
<http://context.log.info|context.log.info>(config.test_param1)
<http://context.log.info|context.log.info>(config.test_param2)
<http://context.log.info|context.log.info>(config.test_param3)
@job
def test_job():
test = f"testing_job_{datetime.now().microsecond}"
test_op.configured({
'test_param1': test,
}, name="test_case")()
How to change default values by using configured()
and Dagster UI launchpad
configurations?