> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Data Source → Build Dashboards & Metrics

> This tutorial guides you through the initial Databrain setup workflow — connecting your database, configuring tenants, and creating dashboards and metrics to visualize your data.

<Note>
  Before starting, ensure your database and tenancy configuration are ready.
</Note>

## Before you begin

* If your database is hosted privately, [whitelist Databrain's IP](https://docs.usedatabrain.com/guides/datasources/allow-access-to-our-ip) so Databrain can connect securely.
* Decide your tenancy configuration: [Choosing the Right Tenancy Model for Your Data](https://docs.usedatabrain.com/guides/onboarding-and-configuration/choosing-the-right-tenancy-model-for-your-data).

<video controls className="w-full aspect-video rounded-xl" src="https://websitelpublicassets.s3.us-east-1.amazonaws.com/Create-datasource1.mp4" />

<Steps>
  <Step title="Add a Data Source (connect your database)">
    1. Sign in to your Databrain workspace.
    2. Go to **Data Studio → Data Sources → + Data Source**.
    3. Choose your database type (Postgres, MySQL, BigQuery, Snowflake, Redshift, etc.).
    4. Enter connection details:
       * Host / IP
       * Port
       * Database name
       * Schema (if applicable)
       * Username & password or key-based credentials
    5. (Optional) Configure SSL options if your DB requires encrypted connections.
    6. Click **Authenticate** to confirm the process.

    <Info>
      Reference: [**Add a Data Source**](https://docs.usedatabrain.com/guides/onboarding-and-configuration/add-a-data-source)
    </Info>
  </Step>

  <Step title="Configure Tenants">
    1. Choose your tenancy level:
       * **Database**: Use this when each client’s data is stored at the database level (each client has its own database).
       * **Table**: Use this when client data is stored as rows identified by an ID column in a single table.\
         Select the table housing your client or organization data and choose the Primary Key column (e.g., `id`, `user_id`, `org_id`).
    2. Create a workspace linked with the connected data source.

    <Info>
      Reference: [**Configure Tenants**](https://docs.usedatabrain.com/guides/datasources/configure-tenants)
    </Info>
  </Step>

  <Step title="Create a Dashboard and Metric">
    1. Click **+ Dashboard**.
    2. Enter a suitable name (e.g., *Revenue Overview*) and click **Create**.
    3. Open the created dashboard and click **+ Metric**.
    4. Drag and drop columns into dimensions and measures or write a SQL query.\
       Adjust chart types and settings, then click **Save to Dashboard**.
    5. Configure additional details and click **Save**.

    <Info>
      References: [**Create a Dashboard**](https://docs.usedatabrain.com/guides/onboarding-and-configuration/create-a-dashboard), [**Create a Metric**](https://docs.usedatabrain.com/guides/onboarding-and-configuration/create-a-metric)
    </Info>
  </Step>
</Steps>

<Check>
  You’ve now completed the initial Databrain setup - your workspace is connected, tenants are configured, and your first dashboard and metrics are created!
</Check>
