docker image for dbt-snowflake

2.1k Views Asked by At

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/dbtand joevandyk/dbtboth:

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

There are 2 best solutions below

0
Driss NEJJAR On BEST ANSWER

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.

0
x89 On

As mentioned above, you need to specify the version for fishtownanalytics.

image: fishtownanalytics/dbt:1.0.0

Here's a full tutorial for creating a similar pipeline: https://medium.com/geekculture/automate-dbt-runs-with-bitbucket-pipelines-3e7528ff991f