Database Connectivity
Connect QRY to your data wherever it lives - from traditional databases to modern data lakehouses, cloud data warehouses, and business applications.
Supported Data Sources
QRY provides native connectors for the most popular enterprise data platforms:
Cloud Data Warehouses
Snowflake
- Secure cloud data warehouse
- Multi-cloud support (AWS, Azure, GCP)
- Virtual warehouse scaling
- Zero-copy cloning and time travel
BigQuery (Google Cloud)
- Serverless data warehouse
- Real-time analytics
- Built-in machine learning
- Automatic scaling and optimization
Redshift (AWS)
- Massively parallel processing (MPP)
- Spectrum for data lake queries
- Concurrency scaling
- Advanced compression
Databricks
- Unified data and AI platform
- Delta Lake integration
- Spark-based analytics
- Collaborative notebooks
Enterprise Data Platforms
Starburst / Trino
- Distributed SQL query engine
- Multi-catalog federation
- Connect to 50+ data sources
- Query pushdown optimization
- Hive, Iceberg, Delta Lake support
Cloudera
- Enterprise data platform
- Hadoop ecosystem integration
- Impala for fast SQL queries
- Kerberos authentication
- Advanced security features
SAP HANA
- In-memory database platform
- Real-time analytics
- Transactional and analytical workloads
- Advanced compression
Traditional Databases
PostgreSQL
- Most advanced open-source database
- Full SQL compliance
- JSON/JSONB, arrays, custom types
- Extensions ecosystem (PostGIS, pgvector)
- Connection pooling and SSL/TLS
Business Applications
Salesforce
- Direct CRM data access
- SOQL query support
- Real-time data synchronization
- Custom objects and fields
Connection Setup
Basic Configuration
Step 1: Navigate to Data Sources
Admin → Data Sources → Add New Connection
Step 2: Enter Connection Details
Connection Name: Production Database
Type: PostgreSQL
Host: db.company.com
Port: 5432
Database: analytics_prod
Username: qry_user
Password: ••••••••
Step 3: Test & Save
- Click "Test Connection"
- Verify connectivity
- Save configuration
Advanced Options
Connection Pooling
Min Pool Size: 2
Max Pool Size: 10
Connection Timeout: 30s
Idle Timeout: 300s
SSL/TLS Security
SSL Mode: require
SSL Cert: /path/to/cert.pem
SSL Key: /path/to/key.pem
CA Certificate: /path/to/ca.pem
Query Optimization
Default Schema: public
Query Timeout: 300s
Max Rows: 10000 (safety limit)
Enable Query Cache: Yes
Security & Authentication
Authentication Methods
Username/Password
- Standard credential-based auth
- Securely encrypted at rest
- Supports password rotation
Service Account
- Recommended for production
- No user credentials stored
- Automatic token refresh
IAM / Cloud Identity
- Cloud-native authentication
- Role-based access
- Temporary credentials
Kerberos
- Enterprise SSO integration
- Ticket-based authentication
- Active Directory support
Connection Security
- Encrypted Storage: All credentials encrypted with AES-256
- In-Transit Encryption: SSL/TLS for all database connections
- Credential Rotation: Support for periodic password updates
- Audit Logging: All connection attempts logged
Connection Management
Monitoring
Connection Health
- Real-time connection status
- Performance metrics
- Error rate tracking
- Uptime monitoring
Query Performance
Average Query Time: 2.3s
Slow Queries (over 10s): 3%
Failed Queries: 0.1%
Active Connections: 5/10
Maintenance
Schema Refresh
- Manual: Click "Refresh Schema" in admin panel
- Automatic: Schedule daily/weekly refreshes
- Incremental: Only update changed objects
Connection Pooling
- Automatic cleanup of idle connections
- Connection recycling after timeout
- Health checks every 60s
Multi-Database Features
Cross-Database Queries
Query across multiple datasources in a single conversation:
User: "Compare sales from our PostgreSQL database with
customer data in Snowflake"
QRY: [Queries both databases and correlates results]
Unified Schema Explorer
Browse all connected databases from one interface:
- Hierarchical view: Datasource → Catalog → Schema → Table
- Search across all connections
- Favorite frequently used tables
- Recent tables for quick access
Configuration Examples
PostgreSQL (Local)
type: postgresql
host: localhost
port: 5432
database: myapp_production
username: qry_reader
password: ${SECRET_DB_PASSWORD}
ssl_mode: prefer
pool_size: 5
Starburst (Cloud)
type: trino
host: starburst.company.cloud
port: 443
catalog: datalake
username: qry_service@company.com
password: ${STARBURST_TOKEN}
ssl_mode: require
http_scheme: https
Cloudera (Kerberos)
type: impala
host: cdh-master.company.local
port: 21050
auth_mechanism: GSSAPI
kerberos_service_name: impala
principal: qry@COMPANY.LOCAL
keytab: /etc/qry/qry.keytab
Best Practices
Performance
DO:
- Use read replicas for analytics queries
- Enable connection pooling
- Set appropriate query timeouts
- Use schema caching
DON'T:
- Connect to production OLTP databases directly
- Set unlimited max_rows
- Disable SSL in production
- Share credentials across environments
Security
Principle of Least Privilege:
- Grant only SELECT permissions to QRY
- Use dedicated service accounts
- Restrict to specific schemas/tables
- Audit access regularly
Network Security:
- Use VPNs or private networks
- Whitelist QRY IP addresses
- Enable SSL/TLS
- Monitor connection attempts
Reliability
High Availability:
- Configure connection retries
- Use database clusters/replicas
- Set up failover connections
- Monitor connection health
Error Handling:
- Graceful degradation if database unavailable
- Clear error messages to users
- Automatic reconnection attempts
- Admin alerts for connection failures
Troubleshooting
Common Issues
Connection Timeout
Error: Could not connect to database
Solutions:
- Verify host and port are correct
- Check firewall rules allow traffic
- Confirm database is running
- Test network connectivity (ping/telnet)
Authentication Failed
Error: Invalid credentials
Solutions:
- Verify username and password
- Check account hasn't been disabled
- Confirm user has required permissions
- Check for special characters in password
SSL Certificate Error
Error: SSL certificate verification failed
Solutions:
- Verify SSL mode matches server requirements
- Check certificate files are valid and readable
- Confirm CA certificate is correct
- Try with SSL mode = 'prefer' for testing
FAQ
Q: Can QRY modify my data? A: By default, no. We recommend read-only (SELECT) permissions. Write access can be granted if needed.
Q: How many databases can I connect? A: No hard limit, but typically 5-50 depending on your license.
Q: Can I connect to databases behind firewalls? A: Yes, use VPN, SSH tunneling, or whitelist QRY's IP addresses.
Q: What happens if a database goes offline? A: Queries to that database will fail gracefully with a clear error message. Other databases remain accessible.
Q: Can I test connection changes before saving? A: Yes, always use the "Test Connection" button before saving.
Next Steps
- Learn about RBAC to control who can access which data
- Explore Data Profiling for automatic table analysis
- Try QRY Nexus to publish curated Data Products from your connected databases
- Read the Admin Guide for advanced configuration
Connect once, query anywhere - QRY brings all your data together in one conversational interface.