Connecting Multiple Databases in Dbt Cloud

Hello dbt community,

I’m new to dbt and currently have a project connected with PostgreSQL in my development database.

My question is whether it’s possible to connect multiple databases in dbt Cloud to accommodate different environments (e.g., development, test, and production). Specifically, I’d like to know if I can set up my project to run the same dbt code in different databases corresponding to these environments.

Here are some additional details:

  1. I have a development database where my project is currently connected. Can I also configure dbt Cloud to connect to my test and production databases?
  2. If multiple database connections are possible, how can I set up and manage these connections within dbt Cloud? Are there any best practices or guides for configuring environments in this manner, especially for someone new to dbt?
  3. Is there a way to easily switch between these different database connections when running dbt commands within dbt Cloud, such as dbt run or dbt test, to ensure that my code is applied to the correct environment?

I appreciate your insights and guidance on this matter. I’m eager to streamline my workflow and ensure that I can effectively manage and deploy dbt code across various environments.

Thank you in advance for your help!