Overview
The Data Connectors component provides custom Airbyte connectors that extract data from 9 different e-commerce platforms, enabling Trendteller to aggregate data from 11 brands into a unified analytics platform.Technology Stack
Airbyte CDK
Connector Development Kit for building integrations
TypeScript
Type-safe connector development
Lerna
Monorepo management for multiple connectors
Jest
Comprehensive testing framework
Connector Architecture
Monorepo Structure
The connectors are organized in a Lerna monorepo:Source Connectors
Available Sources
- ERP Systems
- E-commerce Platforms
- Other Integrations
Bling (
source-bling, source-bling-v3)- Orders, products, customers, inventory
- Invoices, payments, shipping
- Incremental sync support
source-tiny, source-tiny-v3)- Complete ERP data extraction
- Multi-entity support
- Real-time inventory updates
source-totvs-moda)- Fashion industry specific
- Size/color variant handling
- Collection management
Sync Modes
Full Refresh
Full Refresh
When to use: Small datasets, no incremental support
- Replaces all existing data
- Ensures consistency
- Higher resource usage
Incremental Sync
Incremental Sync
When to use: Large datasets with timestamp fields
- Only syncs new/modified records
- Uses cursor field (e.g.,
updated_at) - Efficient and fast
Change Data Capture (CDC)
Change Data Capture (CDC)
When to use: Real-time requirements
- Tracks all changes at source
- Minimal latency
- Requires source support
Destination Connectors
Available Destinations
CRM360
destination-crm360Syncs customer and order data to CRM360 for marketing campaigns and customer engagement.
Shops
destination-shopsPushes consolidated product and inventory data to Shops platform for multi-channel selling.
Connector Development
Creating a New Connector
1
Generate Connector Scaffold
2
Implement Source Interface
3
Add Stream Definitions
4
Write Tests
Stream Configuration
Each stream defines:- Schema: JSON schema for data validation
- Sync modes: Supported synchronization methods
- Cursor field: Field for incremental sync
- Primary key: Unique identifier(s)
- Partitioning: How data is divided for sync
Testing Strategy
Test Levels
- Unit Tests
- Integration Tests
- Acceptance Tests
Test individual functions and utilities:
- API request formatting
- Response parsing
- Data transformation
- Error handling
Test Configuration
Error Handling
Retry Strategies
Transient Errors
Transient Errors
Strategy: Exponential backoff with jitter
- Network timeouts
- Rate limit errors (429)
- Server errors (5xx)
Permanent Errors
Permanent Errors
Strategy: Fail fast and log
- Authentication failures (401)
- Invalid configuration (400)
- Resource not found (404)
Logging
Comprehensive logging for debugging:- Request/response logging (sanitized)
- Sync progress and statistics
- Error details with context
- Performance metrics
Performance Optimization
Batching
Fetch multiple records per API call to reduce overhead
Pagination
Efficiently handle large datasets with cursor-based pagination
Parallel Streams
Sync independent streams concurrently
Caching
Cache API responses for repeated requests
Deployment
Building Connectors
Docker Images
Connectors are packaged as Docker images:Airbyte Cloud
Connectors can be deployed to:- Airbyte Cloud: Hosted Airbyte service
- Self-hosted: On-premise Airbyte instance
- Kubernetes: Scalable container orchestration
Monitoring
Sync Metrics
Track connector performance:- Sync duration: Time to complete sync
- Records synced: Number of records extracted
- Data volume: Bytes transferred
- Error rate: Failed syncs percentage
Health Checks
Automated monitoring:- Connection health (daily checks)
- API quota usage
- Sync schedule adherence
- Data freshness alerts

