Open thijs-nijhuis opened 4 months ago
Any update on this? is there a work-around?
@thijs-nijhuis @noel I have the same behavior with send-report with dbt 1.8.7 (Databricks too) where I try to execute the command within a contianer (no elevation). Did you find a workaround ?
no, I forked the repo and added the missing file. wish they would add it so we dont need a fork
Describe the bug When you run the 'edr report' command from a notebook that has elementary installed as a cluster library (so it is installed on start up and persisted across sessions), the report generation will fail on a permission error when trying to run 'dbt deps' if the cluster is in 'shared' access mode. If the cluster is in 'single user' access mode the command will succeed.
To Reproduce
Expected behavior I expected the the report to be generated at the provided location, just like it does when using a cluster in 'Single-user' mode.
Screenshots
Environment (please complete the following information):
pip show elementary-data
packages.yml
fileAdditional context I did a bit of debugging and testing. When running the command it seems to check if the dbt packages from the project and from the internal dbt project are installed. The first one succeeds because the project is in a writable location. The seconds fails because it tries to write/create a file called package-lock.yml in the internal dbt project inside the elementary package folder. This folder is not writable on a shared cluster (I am actually surprised that it IS writeable on a single user cluster).
I also tried installing elementary as part of the notebook instead of on cluster startup, like so:
%pip install elementary-data=0.15.1
. After you restart the Python kernel and run the same command it DOES succeed. This is because the elementary package in this case is installed in a location that is writeable for the logged in user. Unfortunately this is not an option for us as we run our project as a wheel and both elementary and dbt-databricks are installed as part of that wheel.Maybe it is an idea to have the dbt_packages pre-installed when installing elementary? That way dbt deps won't need to write anything and it would also speed up the process a bit. This might fail when it tries to create a target folder though. Alternatively, perhaps we can configure the location of all writeable locations (target and dbt_packages) as part of the edr command? Just like we can configure the location of the report output.
Would you be willing to contribute a fix for this issue? Sure.