๐ŸŽ‰ Time to fire-up that bad boy ! ๐ŸŽ‰

The virtualenv / poetry env to be used to run the ETL, schould (usually) be the one from the core.datashboards_store folder. if you wan't to use a custome set of dependencies, you are reponsible to configure the cssXX.dashboards_store/pyproject.toml file accordingly to your needs.

We assume you have an opened terminal in the <working dir> folder.

  1. Enable the python environment

    The python environement must be activated so DBT can be run. If you got a error message about the DBT command not being found, you probably forgot to activate it.

cd core.dashboards_store
poetry env activate
The poetry environment schould be activated everytime you want to run DBT, and in each terminal / bash window you want to run DBT from.
  1. Move back your cssXX.dashboards_store folder

Since your cssXX.dashboards_data might override some of the Core'S models, and since it implements the contracts as defined by the store, you schould always run the ETL from the cssXX.dashboards_store folder.

cd ../cssXX.dasboards_store
  1. Run the debug command to test the connection :
dbt debug

The output schould look like this :

15:29:16  Running with dbt=1.4.7
dbt version: 1.4.7
python version: 3.8.10
python path: /home/<store_user>/.cache/pypoetry/virtualenvs/core.dashboards_store-pQVMzw-y-py3.8/bin/python
os info: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29
Using profiles.yml file at /home/<store_user>/<working_directory>/<cssXX>.dashboards_store/profiles.yml
Using dbt_project.yml file at /home/<store_user>/<working_directory>/<cssXX>.dashboards_store/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:
  server: <store\'s server IP>
  database: <store_dev>
  schema: <store_user> -- the default schema schould be your name
  port: <store\'s server port>
  UID: <store_user>
  client_id: None
  authentication: sql
  encrypt: True
  trust_cert: True
  retries: 1
  login_timeout: 0
  query_timeout: 0
  Connection test: [OK connection ok]
All checks passed!
Yรฉ ! You are now ready to populate, configure and run the ETL !

What did I just do ?

  • If your get the awesome All checks passed!, you have successfully configured your project. You haven't materialized anything yet, but at least, you know the dabase can be reached from the computer. You still have to populate the various seeds and models, and to configure the cssXX.dashboards_store/dbt_project.yaml file to be able to materialize the models underlying the dashboards.
  • If you got an error, obvisouly something is not working :
    • Make sure your database's credentials are correct (try to connect to the database using the same credentials within SSMS)
    • Make sure your dabatase is actually reachable from your computer (try the telnet <database's IP> <database's port>)
    • Try googling the error message, it might be a common issue. May the first-page-of-google always be in your favor.