Connecting Data Sources
Learn how to connect your databases to ContextFlo
Last updated: 1/17/2025
Connect your databases to ContextFlo to start analyzing your data.
Supported Databases
ContextFlo supports the following data sources:
- PostgreSQL - Most popular open-source database
- MySQL - Widely used relational database
- Snowflake - Cloud data warehouse
- Redshift - AWS data warehouse
- BigQuery - Google Cloud data warehouse
- DynamoDB - AWS NoSQL database
General Connection Process
Step 1: Gather Connection Details
You'll need:
- Host/Endpoint: Server address
- Port: Database port (default varies by type)
- Database Name: Specific database to connect to
- Username: Database user
- Password: User password
Step 2: Configure Firewall
Ensure your database allows connections from ContextFlo:
- Add ContextFlo IPs to your allowlist
- Enable remote connections
- Configure security groups (for cloud databases)
Step 3: Test Connection
Before saving:
- Click Test Connection
- Verify success message
- Check for any error messages
Step 4: Sync Tables
After connecting:
- Browse available tables
- Select tables to sync
- Click Sync Selected
- Wait for completion
Connection Security
SSL/TLS
ContextFlo supports encrypted connections:
- PostgreSQL: SSL mode (prefer, require, verify-ca, verify-full)
- MySQL: SSL/TLS encryption
- Cloud databases: Automatically use SSL
Credentials Storage
All credentials are:
- ✅ Encrypted at rest
- ✅ Never logged or displayed
- ✅ Stored securely in our database
- ✅ Only accessible by your organization
Read-Only Access
Best practice: Create a read-only database user for ContextFlo:
-- PostgreSQL example
CREATE USER contextflo_readonly WITH PASSWORD 'secure_password';
GRANT CONNECT ON DATABASE your_database TO contextflo_readonly;
GRANT USAGE ON SCHEMA public TO contextflo_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO contextflo_readonly;
Connection Pooling
ContextFlo uses connection pooling for efficiency:
- Connections are reused across queries
- Automatic reconnection on failure
- Configurable timeout settings
- Graceful shutdown on server restart
Troubleshooting
Connection Timeout
Possible causes:
- Firewall blocking connection
- Incorrect host/port
- Database not accepting remote connections
Solutions:
- Check firewall rules
- Verify host and port
- Enable remote access in database config
Authentication Failed
Possible causes:
- Wrong username/password
- User doesn't have permissions
- SSL required but not configured
Solutions:
- Double-check credentials
- Grant necessary permissions
- Enable SSL if required
Tables Not Showing
Possible causes:
- Wrong database/schema
- User lacks SELECT permissions
- Tables are in a different schema
Solutions:
- Verify database name
- Check user permissions
- Specify schema in connection settings
Database-Specific Guides
PostgreSQL
Default port: 5432
# Test connection from command line
psql -h your-host -p 5432 -U contextflo -d your_database
MySQL
Default port: 3306
# Test connection from command line
mysql -h your-host -P 3306 -u contextflo -p your_database
Snowflake
Connection format:
- Account:
account_name.region.snowflakecomputing.com - Warehouse: Specify compute warehouse
- Schema: Database schema to use
BigQuery
Authentication:
- Service account JSON key
- OAuth 2.0 (coming soon)
- Project ID required
Next Steps
Need Help?
Contact support if you're having trouble connecting:
- Email: support@contextflo.com
- In-app chat: Click the help icon