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:

  1. Add ContextFlo IPs to your allowlist
  2. Enable remote connections
  3. Configure security groups (for cloud databases)

Step 3: Test Connection

Before saving:

  1. Click Test Connection
  2. Verify success message
  3. Check for any error messages

Step 4: Sync Tables

After connecting:

  1. Browse available tables
  2. Select tables to sync
  3. Click Sync Selected
  4. 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:

  1. Check firewall rules
  2. Verify host and port
  3. Enable remote access in database config

Authentication Failed

Possible causes:

  • Wrong username/password
  • User doesn't have permissions
  • SSL required but not configured

Solutions:

  1. Double-check credentials
  2. Grant necessary permissions
  3. Enable SSL if required

Tables Not Showing

Possible causes:

  • Wrong database/schema
  • User lacks SELECT permissions
  • Tables are in a different schema

Solutions:

  1. Verify database name
  2. Check user permissions
  3. 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