Site Configuration

The file ~/.pb/siteconfig.yaml contains site specific configuration including secrets. This includes the following:

  1. Details on which warehouse to connect to and the credentials to use to connect.

  2. Credentials to use for connecting to any git repository. Click here to know more on Associating SSH Key to Git Project.

Different PB projects may use different connections. Multiple connections can be kept in the same site configuration file, stored in .pb folder of user’s home directory.

Note

We advise keeping separate schemas for projects running via CLI and web. This way projects run from the CLI will never risk overwriting production data.

A sample file is shown below:

connections:
  prod-db-profile:
    target: dev
    outputs:
      dev:
        type: snowflake
        account: inb828.us-west-3
        dbname: MAT_STORE
        schema: AB_SCHEMA
        user: rik
        warehouse: M_PROD_WAREHOUSE
        password: password
        role: ANALYTICS
      test:
        type: snowflake
        account: inb828.us-west-3
        dbname: MAT_STORE
        schema: TEST_SCHEMA
        user: prof
        warehouse: M_PROD_WAREHOUSE
        password: password
        role: PROFILES_ROLE
  test-db-profile:
      target: test
      outputs:
          db:
              access_token: dabasihasdho
              catalog: rs_dev
              host: adb-98.18.azuredatabricks.net
              http_endpoint: /sql/1.0/warehouses/919uasdn92h
              port: 443
              schema: rs_profiles
              type: databricks
              user: johndoe@abc.onmicrosoft.com
          dev:
              account: uk12.us-west-1
              dbname: RUDDERSTACK_DB
              password: password
              role: RS_ROLE
              schema: RS_PROFILES
              type: snowflake
              user: johndoe
              warehouse: RS_WAREHOUSE
          red:
              dbname: warehouse_rs
              host: warehouse.abc.us-east-3.redshift.amazonaws.com
              password: password
              port: 5419
              schema: rs_profiles
              type: redshift
              user: redshift_user
gitcreds:
 - reporegex: "git@github.com:REPO_OWNER/*" # in case of ssh url
   key: |
       -----BEGIN OPENSSH PRIVATE KEY-----
       **********************************************************************
       **********************************************************************
       **********************************************************************
       **********************************************************************
       ****************************************************************
       -----END OPENSSH PRIVATE KEY-----
 - reporegex: "https://github.com/rudderlabs/*" # https url
   basic_auth:
     username: oauth2
     password: ... # your personal access token with read permission
py_models:
    enabled: true # in case you are using Python models in your project, else set it to false
    python_path: /opt/anaconda3/bin/python # the path where Python is installed (which python). If py_models is not enabled, set it to ""
    credentials_presets: null
    allowed_git_urls_regex: ""
cache_dir: /Users/YOURNAME/.pb/WhtGitCache/
filepath: /Users/YOURNAME/.pb/siteconfig.yaml