How can I run dbt commands within a bitbucket pipeline? What is the correct docker image that I should be using if I wanted to use dbt-snowflake? I tried fishtownanalytics/dbt
and joevandyk/dbt
both:
pipelines:
custom:
test-dbt:
- step:
name: 'Test'
image: fishtownanalytics/dbt
script:
- cd dbt_4flow
- dbt compile
but I still get this error:
+ dbt compile
bash: dbt: command not found
2
Answers
When I try to pull the image locally using
docker pull fishtownanalytics/dbt
I am not able, but by adding the version:
docker pull fishtownanalytics/dbt:1.0.0
It’s working.
You need to add the version to your bitbucket pipeline, so you will be able to do it.
As mentioned above, you need to specify the version for fishtownanalytics.
Here’s a full tutorial for creating a similar pipeline: https://medium.com/geekculture/automate-dbt-runs-with-bitbucket-pipelines-3e7528ff991f