Datasources - Complete Guide

๐ Connect Your Data in Minutesโ
25+ Built-in Connectors ยท Secure Connection Management ยท Real-time Testing
๐ Table of Contentsโ
- What are Datasources?
- Supported Data Sources
- Creating a Datasource
- Datasource Configuration
- Testing Connections
- Managing Datasources
- Security & Encryption
- Troubleshooting
- Best Practices
What are Datasources?โ
Datasources are connection configurations that allow Jet Admin to communicate with external systems. They serve as the foundation for all data operations in the platform, enabling you to:
- ๐ Query databases for dashboard visualizations
- ๐ Fetch data for workflow automations
- ๐ Write data back to external systems
- ๐ Integrate with third-party services
Key Featuresโ
- Unified Interface - Consistent API across all connector types
- Secure Storage - Encrypted credentials at rest
- Connection Pooling - Optimized database connections
- Real-time Testing - Validate connections before saving
- SSH Tunneling - Connect to private networks (coming soon)
- Cloning - Duplicate configurations for different environments
Supported Data Sourcesโ
Jet Admin supports 25+ data sources across multiple categories:
๐พ Databasesโ
| Database | Status | Features |
|---|---|---|
| PostgreSQL | โ Stable | Query, Table Manager, Triggers |
| MySQL | โ Stable | Query, Table Manager |
| MongoDB | โ Stable | Query, Aggregation |
| MS SQL Server | โ Stable | Query, Stored Procedures |
| SQLite | โ Stable | Query, Local Files |
| CockroachDB | โ Stable | Query, Distributed SQL |
| Oracle | ๐งช Beta | Query, PL/SQL |
| Redis | ๐งช Beta | Key-Value Operations |
| Neo4j | ๐งช Beta | Cypher Queries |
โ๏ธ Cloud Servicesโ
| Service | Status | Features |
|---|---|---|
| Google BigQuery | โ Stable | SQL Queries, Data Export |
| Google Sheets | โ Stable | Read/Write, Real-time Sync |
| Google Analytics | โ Stable | Reports, Real-time Data |
| Firestore | โ Stable | Query, Document Operations |
| Supabase | โ Stable | Query, Real-time Subscriptions |
| Airtable | โ Stable | Query, Record Operations |
| Amazon S3 | โ Stable | File Upload/Download |
| Elasticsearch | โ Stable | Search, Aggregations |
๐ APIs & Messagingโ
| Service | Status | Features |
|---|---|---|
| REST API | โ Stable | Custom Endpoints, Auth |
| GraphQL | โ Stable | Queries, Mutations |
| Slack | โ Stable | Send Messages, Channels |
| Twilio | โ Stable | SMS, Voice, WhatsApp |
| SendGrid | โ Stable | Email Templates |
| Stripe | โ Stable | Payments, Customers |
| Jira | โ Stable | Issues, Projects |
| Notion | โ Stable | Pages, Databases |
| RabbitMQ | ๐งช Beta | Publish/Consume |
Creating a Datasourceโ
Step-by-Step Guideโ
1. Navigate to Datasourcesโ
From the Jet Admin sidebar, click on Datasources to open the datasource management page.
2. Click "Create Datasource"โ
Click the Create Datasource button in the top-right corner to open the datasource catalog.
3. Choose a Connectorโ
Browse or search through the available connectors. They're organized by category:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Databases โ๏ธ Cloud Services โ
โ ๐ APIs ๐ง Messaging โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. Configure Connectionโ
Fill in the connection details specific to your datasource type.
Example: PostgreSQL Configuration
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PostgreSQL Connection โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Datasource Title: [Production DB ] โ
โ Host: [db.example.com ] โ
โ Port: [5432 ] โ
โ Database: [myapp_production ] โ
โ Username: [admin ] โ
โ Password: [โขโขโขโขโขโขโขโขโข ] โ
โ โ
โ [โ] Use SSL โ
โ [ ] Require SSL Certificate โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5. Test Connectionโ
Before saving, click Test Connection to verify the credentials work correctly.
6. Save Datasourceโ
Once the test succeeds, click Save Datasource to persist the configuration.
Datasource Configurationโ
Common Configuration Fieldsโ
Most datasources share these common fields:
| Field | Type | Required | Description |
|---|---|---|---|
| Datasource Title | String | โ | Human-readable name for identification |
| Datasource Type | String | โ | Connector type (postgresql, restapi, etc.) |
| Tags | Array | โ | Organizational tags for filtering |
| Description | String | โ | Notes about the datasource's purpose |
Database-Specific Configurationโ
PostgreSQL / MySQLโ
{
datasourceType: 'postgresql',
datasourceTitle: 'Production Database',
datasourceOptions: {
host: 'localhost',
port: 5432,
database: 'myapp',
username: 'admin',
password: 'secret',
ssl: {
enabled: true,
rejectUnauthorized: false
},
pool: {
min: 2,
max: 10
}
}
}
MongoDBโ
{
datasourceType: 'mongodb',
datasourceTitle: 'Analytics DB',
datasourceOptions: {
connectionString: 'mongodb://user:pass@host:27017/dbname',
database: 'analytics',
options: {
useNewUrlParser: true,
useUnifiedTopology: true
}
}
}
API Configurationโ
REST APIโ
{
datasourceType: 'restapi',
datasourceTitle: 'Payment Gateway',
datasourceOptions: {
baseUrl: 'https://api.stripe.com/v1',
authentication: {
type: 'bearer',
token: 'sk_test_...'
},
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
timeout: 30000
}
}
GraphQLโ
{
datasourceType: 'graphql',
datasourceTitle: 'GraphQL API',
datasourceOptions: {
endpoint: 'https://api.example.com/graphql',
authentication: {
type: 'header',
headerName: 'Authorization',
headerValue: 'Bearer token123'
},
defaultQuery: `
query GetData($id: ID!) {
item(id: $id) {
id
name
description
}
}
`
}
}
Cloud Service Configurationโ
Google Sheetsโ
{
datasourceType: 'google_sheets',
datasourceTitle: 'Marketing Data',
datasourceOptions: {
spreadsheetId: '1BxiMvs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',
authentication: {
type: 'service_account',
credentials: {
// Service account JSON key
}
}
}
}
Airtableโ
{
datasourceType: 'airtable',
datasourceTitle: 'Project Tracker',
datasourceOptions: {
apiKey: 'keyXXXXXXXXXXXXXX',
baseId: 'appXXXXXXXXXXXXXX',
tables: ['Projects', 'Tasks']
}
}
Testing Connectionsโ
How Testing Worksโ
When you click Test Connection, Jet Admin:
- Validates Configuration - Checks required fields
- Establishes Connection - Attempts to connect to the external system
- Executes Test Query - Runs a simple query/ping
- Returns Result - Shows success or detailed error
Test Resultsโ
โ Successโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Connection Successful! โ
โ โ
โ Connected to: postgresql://db:5432 โ
โ Database: myapp_production โ
โ Response Time: 45ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Failureโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Connection Failed โ
โ โ
โ Error: ECONNREFUSED โ
โ Message: Connection refused โ
โ Host: db.example.com:5432 โ
โ โ
โ Troubleshooting: โ
โ โข Check if the database is running โ
โ โข Verify firewall settings โ
โ โข Confirm credentials are correct โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Common Test Errorsโ
| Error | Cause | Solution |
|---|---|---|
ECONNREFUSED | Database not reachable | Check host/port, firewall rules |
ETIMEDOUT | Connection timeout | Increase timeout, check network |
ER_ACCESS_DENIED | Wrong credentials | Verify username/password |
SSL_REQUIRED | SSL not enabled | Enable SSL in connection |
DATABASE_NOT_FOUND | Invalid database name | Check database exists |
Managing Datasourcesโ
Datasource Listโ
View all datasources in a searchable, filterable table:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Search datasources... [Filter by Type โผ] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Name Type Tags Last Tested โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Production DB PostgreSQL prod, main 2 min ago โ โ
โ Analytics MongoDB analytics 1 hour ago โ โ
โ Stripe API REST API payments 1 day ago โ โ
โ Marketing Sheets Google marketing 1 week ago โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Actionsโ
From the datasource list, you can:
- Edit - Update connection details
- Test - Re-test the connection
- Clone - Duplicate for another environment
- Delete - Remove the datasource (with confirmation)
Cloning Datasourcesโ
Cloning is useful for creating environment-specific variants:
Production DB (postgresql://prod-db:5432/app_prod)
โ Clone
Staging DB (postgresql://staging-db:5432/app_staging)
Use Cases:
- Development vs Production databases
- Multiple regional instances
- Backup/failover configurations
Security & Encryptionโ
Credential Encryptionโ
All sensitive datasource credentials are encrypted at rest:
// Encryption process
const encrypted = encryptCredentials({
password: 'secret123',
apiKey: 'key_XXXXX'
});
// Stored in database as:
{
encrypted: 'a1b2c3d4...',
iv: 'initialization_vector'
}
Access Controlโ
Datasources are protected by RBAC:
| Permission | Description |
|---|---|
datasource:list | View datasource list |
datasource:read | View datasource details |
datasource:create | Create new datasources |
datasource:update | Edit existing datasources |
datasource:delete | Remove datasources |
datasource:test | Test connections |
Network Securityโ
Best Practices:
- Use SSL/TLS - Always enable encrypted connections
- Restrict IPs - Whitelist Jet Admin server IPs
- Use Service Accounts - Don't use personal credentials
- Rotate Keys - Regularly update API keys and passwords
- Audit Access - Monitor datasource usage logs
Troubleshootingโ
Connection Issuesโ
"Connection Refused"โ
Symptoms: Test connection fails with ECONNREFUSED
Solutions:
- Verify the host and port are correct
- Check if the database/service is running
- Ensure firewall allows connections from Jet Admin
- Test connectivity using telnet or nc:
telnet db.example.com 5432
"Connection Timeout"โ
Symptoms: Test hangs and eventually times out
Solutions:
- Check network connectivity
- Increase timeout in datasource options
- Verify DNS resolution
- Check for network proxies
"Authentication Failed"โ
Symptoms: Connection established but auth fails
Solutions:
- Double-check username/password
- Verify the user has correct permissions
- Check if password expired
- For APIs, verify the token hasn't expired
SSL/TLS Issuesโ
"SSL Required"โ
Solutions:
- Enable SSL in datasource configuration
- For self-signed certs, disable certificate validation (dev only)
- Install CA certificate on Jet Admin server
"Certificate Verification Failed"โ
Solutions:
- Check certificate hasn't expired
- Verify certificate chain is complete
- Ensure hostname matches certificate
Performance Issuesโ
Slow Queriesโ
Solutions:
- Add database indexes
- Optimize query logic
- Increase connection pool size
- Use read replicas for heavy queries
Connection Pool Exhaustionโ
Solutions:
- Increase max pool size
- Reduce idle timeout
- Check for connection leaks
- Monitor active connections
Best Practicesโ
Organizationโ
โ Use Descriptive Names
Good: "Production PostgreSQL - Orders DB"
Bad: "Postgres 1"
โ Add Tags for Filtering
Tags: ['production', 'orders', 'postgresql']
Tags: ['staging', 'analytics', 'mongodb']
โ Document Purpose
{
datasourceTitle: 'Analytics DB',
description: 'Main analytics database for dashboard metrics. Updated hourly via ETL pipeline.'
}
Securityโ
โ Use Environment-Specific Credentials
Development: dev_user / dev_pass
Staging: staging_user / staging_pass
Production: prod_user / prod_pass
โ Enable SSL Everywhere
ssl: {
enabled: true,
rejectUnauthorized: true // except for self-signed in dev
}
โ Rotate Credentials Regularly
- API keys: Every 90 days
- Database passwords: Every 60 days
- Service accounts: Every 180 days
Performanceโ
โ Configure Connection Pools
pool: {
min: 2, // Minimum idle connections
max: 20, // Maximum total connections
idleTimeout: 30000
}
โ Use Read Replicas
// For read-heavy workloads
readReplicas: [
'postgresql://replica1:5432/db',
'postgresql://replica2:5432/db'
]
โ Set Appropriate Timeouts
timeout: 30000, // 30s for most queries
queryTimeout: 60000, // 60s for complex queries
connectionTimeout: 5000 // 5s to establish connection
Monitoringโ
โ Test Connections Regularly
- Automated health checks every 5 minutes
- Alerts on consecutive failures
โ Monitor Usage
- Track query execution times
- Monitor connection pool usage
- Alert on high error rates
โ Audit Access
- Log all datasource modifications
- Review access patterns monthly
- Remove unused datasources
Next Stepsโ
- Data Queries - Build queries using datasources
- Workflow Integration - Use datasources in workflows
- Backend Implementation - Technical details
- Frontend Implementation - UI components