bit.io works great with dbt!

First, install the dbt command line tool per https://docs.getdbt.com/dbt-cli/install/overview

Then, install the dbt-postgres adapter. You can do that with brew install dbt-postgres on OS X, or you can use pip on a windows or linux machine: pip install dbt-postgres

Since bit.io is postgres, the dbt-postgres adapter works out of the box.

Now, setup your profiles.yml file per the dbt instructions.

Here's an example file

# example bit.io profiles.yml file for a dbt project named 'bitdotio'
bitdotio:
  target: dev
  outputs:
    dev:
      type: postgres
      host: db.bit.io
      user: <your bit.io username>
      password: <your bit.io connect password>
      port: 5432
      dbname: <your database name>
      schema: <your schema, often 'public'>
      sslmode: require
      threads: 4

For example, if your username was adam and the database was adam/FCC you'd use this file:

# example bit.io profiles.yml file for a dbt project named 'bitdotio'
# with user `adam` for database `adam/FCC`
bitdotio:
  target: dev
  outputs:
    dev:
      type: postgres
      host: db.bit.io
      user: adam
      password: *******************
      port: 5432
      dbname: adam/FCC
      schema: public
      sslmode require
      threads: 4

You can always find your connect password on the connect tab on your database home page.

Now running dbt debug should connect to bit.io, and you're done!

$ dbt debug
20:46:09  Running with dbt=1.2.0
dbt version: 1.2.0
python version: 3.9.13
python path: /usr/local/Cellar/dbt-postgres/1.2.0/libexec/bin/python
os info: macOS-12.4-x86_64-i386-64bit
Using profiles.yml file at /Users/adam/.dbt/profiles.yml
Using dbt_project.yml file at /Users/adam/Source/bitdotio/dbt_project.yml

Configuration:
  profiles.yml file [OK found and valid]
  dbt_project.yml file [OK found and valid]

Required dependencies:
 - git [OK found]

Connection:
  host: db.bit.io
  port: 5432
  user: adam
  database: adam/FCC
  schema: public
  search_path: None
  keepalives_idle: 0
  sslmode: require
  Connection test: [OK connection ok]

All checks passed!

Did this page help you?