I have an Airflow DAG in which I am trying to run ...
# community-support
n
I have an Airflow DAG in which I am trying to run the command
edr send-report
but elementary is apparently trying to run
dbt deps
during the process, which cause an error because our Airflow is not allowed to get access to internet and install packages for example. But my question is why does it try to run
dbt deps
even though all the dbt packages are already installed? How can i skip this step? I saw this in the dbt_runner Class:
Copy code
def _run_deps_if_needed(self):
        installed_package_names = set(self._get_installed_packages_names())
        required_package_names = set(self._get_required_packages_names())
        if not required_package_names.issubset(installed_package_names):
            self.deps(quiet=True)
It is apparently running
dbt deps
only if the required package (elementary, dbt_utils) are not installed but in my case they are actually installed so I don’t understand why it still tries to run that command.
✅ 1
here is the error I’m getting
a
Which versions of edr and elementary dbt package are you using?
n
edr=0.11.0
elementary-data/elementary=0.11.1
Nevermind, I actually fixed the issue by forcing the installation of the packages in my Docker image so edr doesn’t try to do it again
a
Great to hear you solved it
🙌 1
h
Hey Nawfel, I've run into the same issue as you got, and I've already put
dbt deps
command in my docker image. But whenever I ran
edr report
, it still evokes
dbt deps
command.. would be able to kindly share how did you handle it in you case? Thank you
n
@Han Lai Hey, sorry for late reply! The solution was to add
RUN dbt deps --project-dir /usr/local/lib/python3.11/site-packages/elementary/monitor/dbt_project
in my docker image (you should change the project path to where your elementary package is installed in your image) so that it installs the packages in the path of
dbt_packages
of elementary monitor dbt project, which is the path that they check in
_get_required_packages_names()
👍 1
after that, it didn’t try to evoke a
dbt deps
anymore when running
edr report
h
Thank you so much Nawfel!