skip to Main Content

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

Answers


  1. 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.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search