Hi, is it possible to change job execution path of...
# ask-community
Hi, is it possible to change job execution path of a certain job to be same as where the backing notebook of that job located? In my backing notebook script, I always uses relative file path when reading/writing files. When triggering the job in Dagit, the default job execution path(where the dagster script is) is dagster_home, which is different from my backing notebook directory. I wonder how do I configure the job execution path without changing my dagster_home path? so that in the backing notebook, I won't need to change all those relative file path to absolute file path ( in order to drop the csv output in the original directory). Thank you!
Hi Henry, in your notebook code, you can wrap the relative path with
such as
Copy code
from dagster.utils import file_relative_path
file_relative_path(__file__, "relatove/path/to/file")
👍 1
💯 1