A data source is a database that Rowgate reads to answer your team’s questions. Every source is used in read-only mode, and its credential is stored encrypted.
Connect a database
- In Data sources, click Add source and choose the database type.
- Give the source a name (for example, “ERP” or “Production”).
- Fill in the connection details (see below for each database) and click Test connection.
- Once the test passes, click Continue, check the tables the AI can query and click Save with N tables.
The number of sources depends on your plan. When you reach the limit, the Add source button is disabled until you add an extra connection in Settings.
Supabase
Enter the project URL (https://<project>.supabase.co) and the service key (service_role). Both are in Supabase under Project Settings › API.
Rowgate reads the schemas that the project’s API publishes. To include a schema other than public, add it in Project Settings › Data API › Exposed schemas and click Reload structure in Rowgate.
PostgreSQL, MySQL and SQL Server
Enter the host, port, database, user and password. The server must accept external connections with SSL (on SQL Server, encryption).
- SSL: “Require SSL” encrypts the connection. “Require SSL and verify the certificate” is more secure, but the certificate must come from a recognized authority and be valid for that host.
- Network: the address must be public. Hosts that point to an internal network (localhost or a private IP) are rejected.
- Versions: MySQL 8 and MariaDB; SQL Server 2017 or later and Azure SQL.
Snowflake
Enter the account (the orgname-accountname identifier, in Snowsight › Admin › Accounts), the user, the warehouse, the database and, optionally, the role (leave it empty to use the user’s default role).
Authentication can use a key pair (recommended: paste the unencrypted PEM private key and register the public key on the Snowflake user) or a programmatic access token, generated in Snowsight › Settings › Authentication.
Databricks
Enter the workspace address, the SQL warehouse path, the Unity Catalog catalog and an access token. Use a service principal with read-only permission on the catalog.
Read-only user
We recommend a database user dedicated to Rowgate, with read-only permission on the tables you’ll allow. The connection screen includes a ready-made command under How to create a read-only user. For PostgreSQL, for example:
CREATE ROLE rowgate_leitor LOGIN PASSWORD '<senha forte>';
GRANT USAGE ON SCHEMA public TO rowgate_leitor;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO rowgate_leitor;
- PostgreSQL: repeat both
GRANTstatements for each schema the AI can read. - MySQL:
GRANT SELECT, SHOW VIEW ON <banco>.*to the user, created withREQUIRE SSL. - SQL Server: a login with the
db_datareaderrole on the database. On Azure SQL, runCREATE LOGINon themasterdatabase. - Snowflake: a role with
USAGEon the warehouse, database and schema, andSELECTon the tables. - Databricks:
CAN USEon the warehouse, andUSE CATALOG,USE SCHEMAandSELECTin Unity Catalog.
Even if the user has broader permissions, Rowgate only sends read queries. On PostgreSQL and MySQL, each query runs in a read-only transaction; on SQL Server, in a transaction that is always rolled back at the end.
Choose the exposed tables
Open the source (Tables button) to see all its tables, grouped by schema, and turn each one on or off. Only exposed tables can be added to an access profile.
- A table that is turned off is invisible to all profiles.
- New tables or schemas found when the structure is reloaded come in turned off: nothing new becomes visible until you turn it on.
Reload the structure
Created a table or column in the database? On the source page, click Reload structure. Rowgate also checks each source automatically from time to time.
Connection status
- Operational: the last check passed.
- Failed: the database didn’t respond or refused access. The message with the reason appears on the source card. See Troubleshooting.
- Paused: you paused the source in the ⋯ › Pause source menu. To bring it back, use Resume source.
The card also shows the exposed tables, the latency of the last check and when it happened.