Available Sources
dlt provides several built-in sources for common data loading scenarios. These sources are production-ready and handle authentication, pagination, and incremental loading automatically.Built-in Sources
REST API
REST API Source
Load data from any REST API with declarative configurationThe REST API source provides a flexible way to load data from REST APIs without writing custom code. It supports:Use cases: APIs, SaaS platforms, web services, microservices
- Multiple authentication methods (Bearer, API Key, OAuth 2.0, HTTP Basic)
- Automatic pagination (JSON link, offset, page number, header link)
- Incremental loading with cursor tracking
- Dependent resources for loading related data
- Custom data selectors for nested JSON responses
SQL Database
SQL Database Source
Extract tables from any SQL database using SQLAlchemyThe SQL database source loads data from any SQLAlchemy-supported database. Features include:Use cases: Database replication, data warehousing, analytics, migrations
- Support for PostgreSQL, MySQL, SQL Server, Oracle, SQLite, and more
- Multiple backends: SQLAlchemy, PyArrow, Pandas, ConnectorX
- Incremental loading based on timestamp or auto-incrementing columns
- Schema reflection with configurable detail levels
- Custom query adapters for filtering and transformations
- Column selection and exclusion
Filesystem
Filesystem Source
Read files from cloud storage and local filesystemsThe filesystem source reads files from various storage locations with built-in support for common formats:Use cases: Data lakes, batch processing, file-based ETL, log ingestion
- Cloud storage: AWS S3, Google Cloud Storage, Azure Blob Storage
- Remote: SFTP, Google Drive
- Local filesystem
- Built-in readers for CSV, Parquet, JSONL
- DuckDB-accelerated CSV reading
- Custom file processing support
- Incremental loading based on modification date
Helper Modules
In addition to complete sources, dlt provides helper modules for building custom sources:REST Client
REST Client Helper
Low-level REST client for custom API integrationsThe REST client helper provides building blocks for creating custom API sources:Available auth methods:
BearerTokenAuth- Bearer token authenticationAPIKeyAuth- API key in header or query parameterHttpBasicAuth- HTTP Basic authenticationOAuth2ClientCredentials- OAuth 2.0 client credentials flow
JSONResponsePaginator- Follow JSON linksHeaderLinkPaginator- Follow Link headersOffsetPaginator- Offset-based paginationPageNumberPaginator- Page number pagination
Requests Session
Requests Helper
Enhanced requests session with automatic retriesUse the requests helper for HTTP requests with built-in retry logic:The helper automatically handles:
- Connection errors with exponential backoff
- 5xx server errors
- Network timeouts
- DNS resolution failures
Comparing Sources
When to use REST API source
When to use REST API source
Use the REST API source when:
- Loading data from REST APIs
- You need automatic pagination
- The API requires authentication
- You want incremental loading
- You prefer declarative configuration over code
- The API has complex, custom logic that doesn’t fit the declarative model
- You need fine-grained control over requests
- The API uses GraphQL or other non-REST protocols
When to use SQL Database source
When to use SQL Database source
Use the SQL Database source when:
- Replicating database tables
- Building a data warehouse
- The source is any SQL database
- You need incremental loading based on timestamps
- You want to leverage different backends for performance
- You need complex transformations (do them after loading)
- The database doesn’t have a SQLAlchemy driver
- You’re loading from NoSQL databases
When to use Filesystem source
When to use Filesystem source
Use the Filesystem source when:
- Loading files from cloud storage or local filesystem
- Working with CSV, Parquet, or JSONL files
- Processing data lakes or batch file drops
- Files are added incrementally
- Files are in proprietary or complex formats requiring custom parsing
- You need real-time streaming (use custom source instead)
When to build a custom source
When to build a custom source
Build a custom source when:
- Built-in sources don’t fit your use case
- You need custom business logic or transformations
- The data origin has unique authentication or protocols
- You want to package and reuse your source across projects
Verified Sources
In addition to the built-in sources, dlt maintains a collection of verified sources for popular SaaS platforms and services. These are community-maintained sources that can be installed viadlt init.
Examples include:
- GitHub - Issues, pull requests, repositories
- Google Analytics - Website analytics data
- Stripe - Payment and subscription data
- Salesforce - CRM data
- MongoDB - NoSQL database
- Notion - Workspace data
- Slack - Messages and channel data
Verified sources are maintained separately from the core dlt library. Check the dlt Hub for the complete list.
Source Selection Guide
Identify your data origin
Determine where your data comes from:
- REST API → Use REST API Source
- SQL Database → Use SQL Database Source
- Files in storage → Use Filesystem Source
- Other → Build a Custom Source
Evaluate complexity
Consider the complexity of your requirements:
- Simple, standard patterns → Use built-in sources
- Complex business logic → Build custom source
- Moderate complexity → Start with built-in, extend with transformers
Next Steps
REST API Source
Load data from REST APIs with automatic pagination
SQL Database Source
Extract tables from SQL databases
Filesystem Source
Read files from cloud storage
Custom Sources
Build your own sources from scratch