diff --git a/cosmos/dbt/graph.py b/cosmos/dbt/graph.py index c54e9bfb8..b8ecb16c1 100644 --- a/cosmos/dbt/graph.py +++ b/cosmos/dbt/graph.py @@ -7,7 +7,6 @@ import json import os import platform -import shutil import tempfile import zlib from dataclasses import dataclass, field @@ -353,7 +352,6 @@ def load( def run_dbt_ls( self, dbt_cmd: str, project_path: Path, tmp_dir: Path, env_vars: dict[str, str] ) -> dict[str, DbtNode]: - """Runs dbt ls command and returns the parsed nodes.""" ls_command = [self.dbt_cmd, "ls", "--output", "json"] @@ -443,9 +441,6 @@ def load_via_dbt_ls_without_cache(self) -> None: if not self.profile_config: raise CosmosLoadDbtException("Unable to load project via dbt ls without a profile config.") - if not shutil.which(self.dbt_cmd): - raise CosmosLoadDbtException(f"Unable to find the dbt executable: {self.dbt_cmd}") - with tempfile.TemporaryDirectory() as tmpdir: logger.debug(f"Content of the dbt project dir {project_path}: `{os.listdir(project_path)}`") tmpdir_path = Path(tmpdir)