Guides

Connect a datasource

Connect your database or warehouse, set up access, and run your first query in Querio.

Start with the tables needed for one useful question. You can add more as you go.

Before you start

You'll need:

  • Permission to manage datasource connections in Querio.
  • A database identity with access to the tables you want to analyze. For analytics, use a dedicated identity with read-only access.
  • Network access from Querio to your database.

Enter passwords, tokens and keys in the connection form, rather than an agent conversation. For security documentation, visit the Trust Center.

1. Prepare your database

Follow your provider's guide to prepare credentials, permissions and connection details:

If your database sits behind a bastion, follow Connect through an SSH tunnel.

Working with uploaded files instead? Use Upload files for analysis.

Allow network access

If your database restricts incoming connections, use Copy IP Address in Querio's connection form and have your administrator allow that source to the required database endpoint and port.

A database reachable from your laptop may still need network changes before Querio can reach it.

2. Add the connection in Querio

Open Settings > Datasources > Add datasource, then choose Internal.

Fill in:

  • Slug: a unique identifier, such as analytics-warehouse. This is used by queries, CLI commands and agents, and can't be changed after creation.
  • Name: an optional display name your team will recognize.
  • Database type: your provider.
  • Connection details: the fields described in your provider's setup guide.

Select Test connection. If it succeeds, select Create. Querio tests the connection again before saving it.

Your datasource should now appear in Settings > Datasources.

Starting from CLI or MCP?

From the CLI, open the connection form with:

querio datasource add analytics-warehouse --browser

Replace analytics-warehouse with the slug you want to use.

Through MCP, ask your assistant for a datasource setup link using datasources_setup. Complete the connection in your browser, then return to your assistant. Credentials stay in the browser form.

3. Review who can use it

Open the datasource in settings and review its credential assignments.

The first credential is initially assigned to Everyone. Review that assignment against your team's access policy. Querying also requires permission to access the datasource.

If you add more credentials later, make sure each person has access to exactly one credential for that datasource. Access to multiple credentials prevents Querio from choosing a database identity.

Use Users, roles and groups to configure access for your team.

4. Add your tables

Open Context, select the datasource, and choose Add tables. When tables are already present, use Add schemas to catalog.

Select the schemas or tables needed for your first question and confirm Add.

Check that the expected tables and columns appear, and review any errors. Querio uses this catalog to understand the structure of your data. Next, you can add descriptions, relationships and business definitions.

5. Run your first query

Start an Explore with your datasource selected and ask a small question about a table you know.

For example:

Show the 10 most recent orders, including their order ID,
order date and status. Show the SQL in the notebook.

Replace the table and fields with ones from your database.

Inspect the query and returned rows. A successful connection test confirms connectivity; this query checks access to the actual data you want to use.

If teammates will use the connection, have one of them try a query with their own account too.

Continue with Analyze your data to check a business question against a trusted result.

If you get stuck

ProblemWhat to check
Connection test failsEndpoint, credentials, network rules and TLS configuration. Follow your provider's troubleshooting steps.
Tables are missingDatabase and schema selection, metadata permissions, and errors returned when adding tables.
You can see the datasource but can't query itDatasource permission, credential assignment and the database identity's table access.
Querio reports multiple authorized credentialsReview group and other assignments so the person can use exactly one credential.

For connection fields and credential behavior, see Datasources and credentials.

Was this page helpful?

Last updated on October 27, 2026

On this page