Connecting Databases
Connect your databases and data warehouses to Querri, choose which tables to load, and ask questions about them in plain language.
Querri copies the tables you choose into its own storage and works from that copy, so answers don’t run against your database each time. Your data is as fresh as its last sync.
Supported databases
Section titled “Supported databases”| Database | How it connects | Page |
|---|---|---|
| PostgreSQL | Host and credentials | PostgreSQL |
| MySQL (and MariaDB) | Host and credentials | MySQL |
| Microsoft SQL Server | Host and credentials | SQL Server |
| Amazon Redshift | Host and credentials | Amazon Redshift |
| BigQuery | Google sign-in | BigQuery |
Adding a database connection
Section titled “Adding a database connection”Step 1: Open the connector
Section titled “Step 1: Open the connector”- Click Connect in the app rail, then pick your database under Connect a data source.
- Or, as an admin, open Settings → Connectors and click Connect on its card.
The connector dialog opens on its Configuration tab. The connector lands in the workspace you’re in if you’re a member, and in your private workspace otherwise.
Step 2: Enter connection settings
Section titled “Step 2: Enter connection settings”PostgreSQL, MySQL, SQL Server and Redshift share one form. Under Connection Settings:
| Field | Notes |
|---|---|
| Connector Name | Defaults to the database type. Use something descriptive, like “Orders replica” |
| Host * | Host name (db.acme.com) or IP address |
| Port | Defaults: 5432 PostgreSQL, 3306 MySQL, 1433 SQL Server, 5439 Redshift |
| Username * | A read-only user is best (see below) |
| Password | |
| Database | Optional. Leave it blank to discover databases from the server. Redshift fills in dev |
Encryption:
- PostgreSQL, MySQL and Redshift have a Require SSL Connection switch, on by default.
- SQL Server has Trust Server Certificate (on by default) and Encrypt Connection (off by default).
Connect via VPN (Advanced): for a database reachable only through an OpenVPN tunnel. Turn it on and add all four files: OpenVPN config (.ovpn), CA certificate (ca.crt), Client certificate (.crt) and Client private key (.key).
Step 3: Test the connection
Section titled “Step 3: Test the connection”Click Test connection and discover access.
On success you’ll see “Connected! Found {n} databases and {m} schemas”, and the button changes to Re-test connection. If it fails, Connection Failed appears with the reason.
Step 4: Select data
Section titled “Step 4: Select data”Under Select Data:
- Database & Schema: pick a database, then a schema (defaults to
public, ordboon SQL Server). Each schema shows how many tables it has. MySQL has no schema step. Choosing a database or schema saves the connector. - Table Selection: All Tables is on by default. Turn it off to pick tables yourself, with Select All, Clear and Filter tables….
- Custom SQL Queries: click + Add Query to load the result of your own query as a source. Give it a Query Name and the SQL Query; Test Query runs it limited to 10 rows.
On Redshift, each table also has Advanced options for large tables (see Amazon Redshift).
Step 5: Advanced settings
Section titled “Step 5: Advanced settings”Under Advanced Settings:
- Limit rows per table: caps how many rows load from each table. MySQL starts with a limit of 100,000 rows; PostgreSQL, SQL Server and Redshift start unlimited.
- Data Sync Enabled: whether tables sync from this database. It stays off until you load data.
Step 6: Load your data
Section titled “Step 6: Load your data”Click Save and Load Data. Querri turns data sync on, saves, and runs a full sync. A progress card at the bottom of the screen shows each table as it loads, and stays there if you move to another page. When it’s done, it reads “{name} is ready”, with View in Library and a Sync daily button that sets up a daily full refresh.
To save changes without loading, click Update.
If the database or schema you picked is empty, Querri says no tables were found, so check your selection and try again.
BigQuery
Section titled “BigQuery”BigQuery connects with Google sign-in instead of a host and password:
- Click Connect on BigQuery and sign in with Google.
- Under Select BigQuery Project, choose a project. There’s one connector per project.
- Choose tables, and add custom SQL queries if you need them (Test Query (LIMIT 10)).
- Limit total rows per table is on at 100,000 rows by default.
There’s no separate dataset step. See BigQuery.
Database users and permissions
Section titled “Database users and permissions”Querri copies your data, and custom queries run whatever SQL you write, so connect with a dedicated read-only user.
PostgreSQL:
CREATE USER querri_readonly WITH PASSWORD 'secure_password';GRANT CONNECT ON DATABASE your_database TO querri_readonly;GRANT USAGE ON SCHEMA public TO querri_readonly;GRANT SELECT ON ALL TABLES IN SCHEMA public TO querri_readonly;ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO querri_readonly;MySQL:
CREATE USER 'querri_readonly'@'%' IDENTIFIED BY 'secure_password';GRANT SELECT ON your_database.* TO 'querri_readonly'@'%';FLUSH PRIVILEGES;SQL Server:
CREATE LOGIN querri_readonly WITH PASSWORD = 'secure_password';USE your_database;CREATE USER querri_readonly FOR LOGIN querri_readonly;ALTER ROLE db_datareader ADD MEMBER querri_readonly;Use strong, unique passwords, and grant access only to the schemas and tables people need. Database Best Practices shows how to set up an analytics schema.
Network access
Section titled “Network access”If your database only accepts connections from known addresses, allow Querri’s outbound IP address in your firewall or security group. If it’s only reachable over a private network, use Connect via VPN (Advanced).
Multiple databases
Section titled “Multiple databases”You can connect several databases of the same type, such as production, a reporting replica and a regional database. Each gets its own connector, settings and schedule. In Settings → Connectors, use the add-another icon on a connected card.
Working with your tables
Section titled “Working with your tables”After loading, each table appears in the Library as a source typed Dataset. From there you can:
- Ask the Librarian about it.
- Open it to check its columns, row count and where it came from.
- Select tables on the Files tab and click Create Project to start an analysis.
Keeping data fresh
Section titled “Keeping data fresh”A connector’s owner can schedule syncs on the Schedule tab:
- Full Refresh reloads every table.
- Incremental fetches only new or changed rows, using a cursor column such as
updated_at. Tables without that column are skipped by the incremental schedule. Leave the Cursor Field blank to let Querri detect one.
Good cursor columns:
updated_atormodified_at: catches new and changed rowscreated_at, or an auto-incrementingid: only for tables that never update rows
Scheduled syncs use credits when they run; syncs you start by hand don’t. See Sync Scheduling.
Best practices
Section titled “Best practices”- Connect to a read replica rather than your primary database where you can.
- Use a read-only user with access to only the tables people need.
- Keep SSL on for connections over public networks.
- Load only what you need, with Table Selection or Limit rows per table.
- Create analytics views in your database for data that’s always joined together.
Troubleshooting
Section titled “Troubleshooting”Cannot connect
Section titled “Cannot connect”Connection Failed appears in the dialog. Check that:
- the database is running and accepts remote connections
- the host and port are right
- your firewall or security group allows Querri’s address, or the VPN files are loaded
- the SSL settings match what the server expects
Authentication fails
Section titled “Authentication fails”Check that:
- the username and password are right
- the user has permission to connect to the database
- the account isn’t locked or expired
Tables or schemas don’t appear
Section titled “Tables or schemas don’t appear”Check that:
- the user has SELECT on the tables
- the tables are in the database and schema you picked
- on PostgreSQL, the user has USAGE on the schema
- on SQL Server, the user has VIEW DEFINITION permission
Nothing loads
Section titled “Nothing loads”If Querri reports no tables found, the database or schema you picked is empty or the user can’t see its tables. Change the selection under Select Data and click Save and Load Data again.
Next Steps
Section titled “Next Steps”- Database Best Practices: analytics views and access for analytics users
- Managing Connections: change, refresh and remove connectors
- PostgreSQL, MySQL, SQL Server, Amazon Redshift
Additional Resources
Section titled “Additional Resources”- PostgreSQL connection documentation: postgresql.org/docs
- MySQL connection parameters: dev.mysql.com
- SQL Server connection: docs.microsoft.com