Dileep Damodaran
12/13/2023, 10:08 AMsettings.toml
file within a prefect flow and passing it to a python method that just prints the configured value. In the test case, I’m mimicing the the test configurations and on running the test cases the python method prints the configuration value as it is. But the moment i decorate the python method with.@prefect.task
it prints the actual configuration value from the settings.toml
file instead of test configurations
Accessing `conf_value = settings.get(“conf_key”,“default_value”) within the task returns the test configuration though. The issue is only when the configuration is passed into the prefect task. Does anybody knows why?
@prefect.task
def print_param(param:str):
print(param)
with Flow("test_flow") as flow:
conf_value = settings.get("conf_key","default_value")
print_param(conf_value) // prints the test configuration when not decorated with @prefect.task, prints the
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by