FileNotFoundError when using dynamic parameters functionality in dbx launch #614
Unanswered
JensvandeZande
asked this question in
Q&A
Replies: 1 comment 1 reply
-
hi @JensvandeZande , |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having trouble using dynamic parameters and configuration files while using the spark_python_task method. It seems that "dbx launch" does not resolve "file:fuse://" properly. This can be related to this issue. Let me sketch the situation.
I am using dbx's Task() abstract base class as described here for its various functionalities. In particular its configuration file reader methods. I use this configuration file to tell each task where to read and write the data. Next to the "--conf-file" parameter I have another parameter "--date" that I want to use as a dynamic parameter. For this, I used argument parser just like the Task._get_conf_file() method. However, when supplying parameters to the "--parameters" argument of "dbx launch" I need to also provide "--conf-file" parameter as the "parameters" argument in the task definition of the deployment.yml file gets overwritten when supplying dynamic parameters.
My deployment.yml looks like this:
My cli call looks like this:
dbx deploy bronze2gold --deployment-file project1/table1/conf/deployment.yml dbx launch bronze2gold --parameters='{"python_params":["--conf-file", "file:fuse://project1/table1/conf/tasks/bronze2silver.yml", "--date", "2022/11/02"]}'
I can see in the output that the arguments are being parsed, but I get the error FileNotFoundError: [Errno 2] No such file or directory: "file:fuse://project1/table1/conf/tasks/bronze2silver.yml".
I have tried "/dbfs/" and "dbfs://" instead of "file:fuse:" but I get the same error.
When I use "dbx execute" everything works:
Can anyone explain to me what is happening and how I can solve my problem? Also, how should I solve it when I add a second task to my workflow that has a separate config file? See commented lines in deployment.yml. Per the documentation it is not possible to provide task specific parameters. Does this then mean we cannot use dbx's Task() abstract base class when using dynamic parameters?
KR Jens
Beta Was this translation helpful? Give feedback.
All reactions