DbtShellTask does not work without profiles_dir parameter
See original GitHub issueHi,
profiles_dir parameter is marked as optional, but without that parameter DbtShellTask fails:
TypeError('expected str, bytes or os.PathLike object, not NoneType')
It happens because of this line: https://github.com/PrefectHQ/prefect/blob/6ef1f36362a46762985dfcab27a3c4ea0ec8084a/src/prefect/tasks/dbt/dbt.py#L146
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
DBT Tasks - Prefect Docs
Task for running dbt commands. It will create a profiles.yml file prior to running dbt commands. This task inherits all configuration options from...
Read more >Dbt run command - sono naturale
DBT-16004: The string command line argument is not valid for configuring a ... without having The AWS Batch job runs the command dbt...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
dbt docs at https://docs.getdbt.com/dbt-cli/configure-your-profile/#using-a-custom-profile-directory says:
Therefore, I think that without
profiles_dir
parameter specified the~/.dbt/
directory should be used.@fertek @Zaubeerer It’s been a while since I wrote this but I believe I left it as optional because you might have the location already set through the dbt envar
DBT_PROFILES_DIR
. If it wasn’t possible to set the dir this way, I would have made it required.I think defaulting the profiles_dir path to ~/.dbt/ is a great idea, just as long as the DBT_PROFILES_DIR envar gets priority in determining the path location. This would be in keeping with how dbt checks for the profiles.yml file.