airflow-dbt icon indicating copy to clipboard operation
airflow-dbt copied to clipboard

Use --no-use-colors in dbt_hook.py

Open gbonazzoli opened this issue 3 years ago • 1 comments

My little advice is to to use the switch --no-use-colors in dbt_hook.py

    def run_cli(self, *command):
        """
        Run the dbt cli

        :param command: The dbt command to run
        :type command: str
        """

        dbt_cmd = [self.dbt_bin, "--no-use-colors", *command]

        if self.profiles_dir is not None:
            dbt_cmd.extend(['--profiles-dir', self.profiles_dir])

The log will be cleaner and not full of ANSI escape chars.

gbonazzoli avatar Sep 07 '21 12:09 gbonazzoli

Hey, I added this option to my PR since I think it's an interesting one

dinigo avatar Oct 22 '21 22:10 dinigo