Data Sources
![]()
Data Sources represent database connections that you want to monitor with Beacon.
Purpose
Section titled “Purpose”Data Sources allow you to:
- Connect to multiple databases and services across different servers
- Organize queries by database or application
- Support nine connectors: PostgreSQL, SQL Server, MySQL, Google BigQuery, Snowflake, Databricks, Azure Synapse, AWS CloudWatch, and a generic REST API
- Reuse connections across multiple queries
- Manage credentials securely (connection strings are encrypted at rest with AES-256 via the required
Beacon:EncryptionKey)
Use Cases
Section titled “Use Cases”- Application Database Monitoring: Create a data source for each application’s database
- Multi-Database Reporting: Connect to different databases for consolidated reporting
- Environment Separation: Separate data sources for dev, staging, and production
- Multi-Tenant Monitoring: One data source per tenant database
Creating a Data Source
Section titled “Creating a Data Source”Step 1: Navigate to Data Sources
Section titled “Step 1: Navigate to Data Sources”- Log in to Beacon at the React UI (
/login) - Click Data Sources in the left navigation menu (
/data-sources) - Click Create New Data Source
Step 2: Fill Data Source Details
Section titled “Step 2: Fill Data Source Details”| Field | Description | Required | Example |
|---|---|---|---|
| Name | Descriptive data source name | Yes | Production Database |
| Description | Purpose of this data source | No | Main application database monitoring |
| Database Type | Connector engine | Yes | PostgreSQL, SQL Server, MySQL, Google BigQuery, Snowflake, Databricks, Azure Synapse, AWS CloudWatch, or REST API |
| Connection String | Connection details | Yes | See examples below |
Step 3: Configure Connection String
Section titled “Step 3: Configure Connection String”PostgreSQL:
Host=prod-db.company.com;Database=myapp;Username=readonly;Password=secretpassSQL Server / Azure Synapse:
Server=sql-server.company.com;Database=myapp;User Id=readonly;Password=secretpass;TrustServerCertificate=TrueMySQL:
Server=mysql-server.company.com;Database=myapp;Uid=readonly;Pwd=secretpassOther connectors (Google BigQuery, Snowflake, Databricks, AWS CloudWatch, and the generic REST API) use connector-specific connection details — for example service-account credentials, account/warehouse identifiers, workspace tokens, AWS region/keys, or a base URL with auth headers. The Create New Data Source form shows the fields required for the connector you select.
Step 4: Test Connection
Section titled “Step 4: Test Connection”- Click Test Connection button
- Wait for validation (typically 2-5 seconds)
- Verify success message appears
Step 5: Save Data Source
Section titled “Step 5: Save Data Source”Click Save to create the data source.
Managing Data Sources
Section titled “Managing Data Sources”View Data Sources
Section titled “View Data Sources”The Data Sources page shows all configured data sources with:
- Data source name and description
- Database type
- Number of queries using this data source
- Last query execution time
- Actions (Edit, Delete, View Queries)
Edit Data Source
Section titled “Edit Data Source”- Click Edit (pencil icon) on the data source row
- Modify details or connection string
- Click Test Connection to verify changes
- Click Save
Delete Data Source
Section titled “Delete Data Source”- Click Delete (trash icon) on the data source row
- Confirm deletion in the dialog
- Data source is archived (soft delete)
Metadata Loading Options
Section titled “Metadata Loading Options”For database-type data sources, Beacon loads schema metadata (tables, columns, relationships) to power features like the ad-hoc query editor with IntelliSense and AI documentation generation. You can control this behavior when creating or editing a data source.
Configuration Options
Section titled “Configuration Options”| Option | Description | Default |
|---|---|---|
| Metadata Loading Enabled | Enable/disable automatic metadata loading | Enabled |
| Max Tables | Limit the number of tables loaded (0 = unlimited) | 0 |
| Max Columns Per Table | Limit columns per table (0 = unlimited) | 0 |
| Table Names Only | Load only table names, skip column details | Off |
| Include Schemas | Only load metadata from these schemas | All |
| Exclude Schemas | Skip metadata from these schemas | None |
When to Disable Metadata Loading
Section titled “When to Disable Metadata Loading”- Very large databases (1000+ tables) where loading metadata is slow
- Restricted access databases where the user doesn’t have schema read permissions
- CloudWatch or non-database data sources (metadata is not applicable)
When to Use Schema Filters
Section titled “When to Use Schema Filters”- Exclude system schemas like
information_schema,pg_catalogto reduce noise - Include only specific schemas to focus on relevant tables
- Multi-schema databases where you only need metadata from certain schemas
Viewing Metadata Status
Section titled “Viewing Metadata Status”The data source details page shows the metadata loading status in the Overview section:
- Enabled (green) - Metadata is loaded and available for IntelliSense
- Disabled (red) - Metadata loading is turned off
Example: Large Database with Schema Filtering
Section titled “Example: Large Database with Schema Filtering”When adding a large production database, limit metadata to relevant schemas:
Metadata Loading: EnabledMax Tables: 200Include Schemas: public, appExclude Schemas: pg_catalog, information_schema, pg_toastThis loads only tables from the public and app schemas, capped at 200 tables.
Schema Relationships
Section titled “Schema Relationships”Loaded metadata tells Beacon what tables exist; schema relationships tell it how to join them. Open a data source and go to Schema relationships (/data-sources/{id}/relationships) to review and curate them.
- Foreign key relationships come from the database’s declared constraints and are verified by default.
- Inferred relationships are proposed from column naming with a confidence score. Click Discover to preview proposals without saving, then accept the ones that are correct.
- Manual relationships are declared by hand and are treated as verified.
Only verified relationships are presented to the SQL generator as authoritative join paths; unverified inferences are passed separately and explicitly flagged. The page opens with a schema health panel — table and relationship counts, how many are unverified, connected groups, isolated tables, and detected junction tables — which is the fastest way to see which parts of a schema an AI assistant currently has no way to reach.
See the Knowledge Base guide for how join paths are used during generation, and the REST endpoints for managing them.
Connection Best Practices
Section titled “Connection Best Practices”Use Read-Only Users
Section titled “Use Read-Only Users”Create dedicated read-only database users for Beacon:
PostgreSQL:
CREATE USER beacon_readonly WITH PASSWORD 'strong-password';GRANT CONNECT ON DATABASE your_database TO beacon_readonly;GRANT USAGE ON SCHEMA public TO beacon_readonly;GRANT SELECT ON ALL TABLES IN SCHEMA public TO beacon_readonly;ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO beacon_readonly;SQL Server:
CREATE LOGIN beacon_readonly WITH PASSWORD = 'strong-password';USE your_database;CREATE USER beacon_readonly FOR LOGIN beacon_readonly;ALTER ROLE db_datareader ADD MEMBER beacon_readonly;MySQL:
CREATE USER 'beacon_readonly'@'%' IDENTIFIED BY 'strong-password';GRANT SELECT ON your_database.* TO 'beacon_readonly'@'%';FLUSH PRIVILEGES;Enable Connection Pooling
Section titled “Enable Connection Pooling”For high-frequency queries, enable pooling:
PostgreSQL:
Host=postgres;Database=db;Username=user;Password=pass;Pooling=true;MinPoolSize=5;MaxPoolSize=20Benefits:
- Faster query execution (reuse connections)
- Lower database server load
- Better handling of concurrent subscriptions
Set Appropriate Timeouts
Section titled “Set Appropriate Timeouts”For long-running queries, increase timeout:
PostgreSQL:
Host=postgres;Database=db;Username=user;Password=pass;CommandTimeout=300SQL Server:
Server=sqlserver;Database=db;User Id=user;Password=pass;Connection Timeout=300Match the timeout with subscription timeout setting.
Examples
Section titled “Examples”Example 1: Production PostgreSQL
Section titled “Example 1: Production PostgreSQL”Name: Production App DatabaseDescription: Main application database for monitoringDatabase Type: PostgreSQLConnection String: Host=prod-postgres.company.com;Database=appdb;Username=monitor;Password=secret;SSL Mode=Require;Pooling=true;MaxPoolSize=10Example 2: SQL Server Data Warehouse
Section titled “Example 2: SQL Server Data Warehouse”Name: Data WarehouseDescription: Analytics database for reportingDatabase Type: SQL ServerConnection String: Server=dwh.company.com;Database=analytics;User Id=reporting;Password=secret;TrustServerCertificate=TrueExample 3: Multi-Tenant MySQL
Section titled “Example 3: Multi-Tenant MySQL”Name: Tenant Database (Customer A)Description: Customer A's isolated databaseDatabase Type: MySQLConnection String: Server=mysql.company.com;Database=tenant_a;Uid=readonly;Pwd=secret;SslMode=RequiredTroubleshooting
Section titled “Troubleshooting”Connection Test Fails
Section titled “Connection Test Fails”Check network connectivity:
# Test database host connectivityping your-database-hostVerify database is accessible:
telnet your-database-host 5432 # PostgreSQLtelnet your-database-host 1433 # SQL Servertelnet your-database-host 3306 # MySQLCommon issues:
- Firewall blocking connection
- Database not accepting remote connections
- Wrong hostname or port
- VPN required but not connected
Permission Denied
Section titled “Permission Denied”Ensure database user has necessary grants:
-- PostgreSQL: Check user permissionsSELECT grantee, privilege_typeFROM information_schema.role_table_grantsWHERE grantee = 'your_user';
-- SQL Server: Check user roleSELECT dp.name AS UserName, dp.type_desc, r.name AS RoleNameFROM sys.database_principals dpLEFT JOIN sys.database_role_members drm ON dp.principal_id = drm.member_principal_idLEFT JOIN sys.database_principals r ON drm.role_principal_id = r.principal_idWHERE dp.name = 'your_user';SSL Certificate Errors
Section titled “SSL Certificate Errors”For self-signed certificates:
PostgreSQL:
Host=postgres;Database=db;Username=user;Password=pass;SSL Mode=Require;Trust Server Certificate=trueSQL Server:
Server=sqlserver;Database=db;User Id=user;Password=pass;TrustServerCertificate=TrueRelated Documentation
Section titled “Related Documentation”- Queries - Create queries using this data source
- Data Migration - Move data between connected sources
- Knowledge Base & Grounding - Join paths, glossary, and the grounding context built from this metadata
- Configuration - Connection string reference