Sources
Sources read data into the pipeline. Each source has a type, a provider, settings, and a list of assets - the concrete things to read (tables, file sets, topics, API calls).
At a glance
- Six types -
jdbc,nosql,file_system,object_storage,api,stream. - Assets are the unit of read - each becomes a
sources.<source>.<asset>FQN. - Offsets make reads incremental - batch sources only; stream position lives in Spark checkpoints.
- Connections keep credentials out - reference a saved connection or go inline.
Common shape
Code
Provider matrix
| Source type | Providers |
|---|---|
jdbc | postgres, mysql, mssql, oracle |
nosql | mongodb, cassandra, dynamodb, cosmosdb, hbaseelasticsearch, solr, firestore, rethinkdb, couchdb |
file_system | local, sftp, onedrive, sharepoint, smb |
object_storage | s3, minio, gcs, azure_blob |
api | rest |
stream | kafka, redis, kinesis, sqs |
Reference by type
Every connection field, settings option, asset field, asset option, and file-format option is listed per type:
| Type | Reference |
|---|---|
jdbc | JDBC sources |
nosql | NoSQL sources |
file_system | File system sources |
object_storage | Object storage sources |
api | API sources |
stream | Stream sources |
Settings
settings holds either a connection_name (a saved connection, resolved from /api/connections) or inline connection fields with an auth block, plus provider-level options. Common auth shapes:
| Auth fields | Used by |
|---|---|
user, password | JDBC, NoSQL (most), SFTP, SMB |
tenant_id, client_id, client_secret | OneDrive, SharePoint (Graph) |
access_key, secret_key, region | S3, MinIO, Kinesis, SQS, DynamoDB |
service_account_json | GCS, Firestore |
account_name, account_key | Azure Blob |
| security protocols + SASL | Kafka (see below) |
Kafka auth is one of: PLAINTEXT, SSL (truststore), SASL_PLAINTEXT (PLAIN / SCRAM-SHA-256 / SCRAM-SHA-512 + user/password), or SASL_SSL (same + truststore).
Assets
| Field | Used by | Purpose |
|---|---|---|
name | all | Asset name (part of the FQN) |
format | file, object | csv, json, parquet, orc, text, excel |
files_pattern | file, object | Glob - no ** allowed |
recursive / max_depth | file, object | Descend into subfolders |
schema | file, object, jdbc, nosql, api | DDL: "id int, name string" |
table | jdbc, nosql | Table or collection |
query | jdbc, nosql | Query instead of a table |
catalog | hbase | HBase catalog (with table) |
url, method | api | REST call (GET/POST/PUT/PATCH) |
topic / stream / queue | stream | Kafka topic / Redis, Kinesis stream / SQS queue |
offset | all except stream | Incremental watermark |
downloadable_files | file, object, api | Download remote files first |
chain | all except stream | Read per-row from another asset |
options | all | Per-provider, per-format options |
By source type
file_system
Reads files from local disk, SFTP, SMB shares, or OneDrive/SharePoint (via Microsoft Graph). Assets need format + files_pattern. Remote providers (SFTP/SMB/OneDrive/SharePoint) either stream reads through Hadoop or download files first (see Downloadable files).
Settings options worth knowing: ignore_corrupt_files, ignore_missing_files, modified_before, modified_after, time_zone. Format options (e.g. CSV delimiter, header, infer_schema, mode; Excel sheet_name, workbook_password) are schema-validated per format.
jdbc
Reads from PostgreSQL, MySQL, MSSQL, or Oracle. Each asset uses table or query - not both. A declared schema overrides inference. Useful asset options: partition_column with lower_bound/upper_bound for parallel reads, fetch_size, push_down_predicate.
Offsets are pushed down into SQL - a WHERE key > value is appended to the query or table select before the read.
nosql
Ten providers. Assets use table (collection/index/keyspace table), except Cassandra which also accepts query; HBase needs table + catalog. Per-provider read options are schema-validated - e.g. MongoDB partitioner and allow_disk_use, Cassandra where and consistency_level. Write options such as operation_type, upsert_document, and id_field_list live on destinations. MongoDB also supports change streams in stream mode (stream_startup_mode, stream_lookup_full_document).
object_storage
Reads from S3, MinIO, GCS, or Azure Blob. Settings pick protocol (s3a default, gs, wasbs/abfss), bucket/container, path, and auth. Assets work like file-system assets (format + files_pattern, recursive, max_depth). Provider settings options map to Hadoop connector configs (fs.s3a.*, fs.gs.*, fs.azure.*).
api (REST)
Each asset is one HTTP call: url + method, plus options:
headers,params,body,response_path(JSONPath into the response)max_fetch_size,ignore_not_found(status-code rules)- Pagination - four strategies, each with
limit(max_pages10,max_records1000) anddelay_ms:
| Strategy | Key config |
|---|---|
page_number | page_num_param, page_size_param |
skip_limit | skip_param, page_size_param |
cursor | cursor_param, cursor_path |
next_link | next_link_path |
Each strategy stops on a completion_on rule (empty_page, short_page, total_pages, total_records, no_link) or when a limit is hit.
stream
Reads Kafka topics, Redis streams, Kinesis streams, or SQS queues with Spark Structured Streaming. Output columns per provider:
| Provider | Columns |
|---|---|
kafka | key, message, topic, partition, offset, timestamp |
redis | Connector's own schema (no wrapper columns) |
kinesis | key, message, streamName, sequenceNumber, timestamp |
sqs | message, ingest_ts |
Kafka asset options include starting_offsets (latest/earliest), fail_on_data_loss, max_offsets_per_trigger, min_partitions, include_headers/header_names; Kinesis uses starting_position (LATEST/TRIM_HORIZON/EARLIEST/AT_TIMESTAMP); SQS has poll_interval.
Stream sources do not use asset offset or chain - their position lives in Spark checkpoints instead (see Checkpoints and Offsets).
Offsets
Declare an offset on an asset to make batch reads incremental. key, initial_value, and type are all required; type is one of timestamp, datetime, date, integer, int, long, id, string, text, cursor, token, or page. APIs also accept response_key and format (iso8601, epoch_millis, epoch_seconds, or a pattern).
How each family applies the watermark:
| Family | Filter | New offset |
|---|---|---|
jdbc | WHERE key > value pushed into SQL | max(key) |
nosql | Post-read Spark filter | max(key) |
file, object | file_modified → modifiedAfterfile_name → metadata filter | max(...) of the key |
api | Offset injected as request params | response_key max |
Offsets are committed only after a fully successful run - a failed run re-reads from the previous watermark (at-least-once).
Downloadable files
Some assets download remote files before Spark reads them (SFTP, SMB, OneDrive/SharePoint, S3/GCS/Azure, REST). Configure with downloadable_files:
Code
files_reading: true→ files are downloaded (run temp dir by default, cleaned after the run;downloading_directorykeeps them) and read with the asset'sformat/schema.files_reading: false→ the frame is a listing:file_name,file_format,source_name,asset_name,local_path(REST addsoriginal_url).- REST listing mode also needs
url_field(JSONPath to the download URL in each item) and supportsname_field,pattern, ordirect_download: truewhen the response body is the file itself.
Asset chaining
An asset can read once per row of a previously loaded asset:
Code
{{column}} placeholders resolve per parent row; pass_columns: true prepends the parent row's columns (optionally prefixed). Chained results are unioned into one frame, and chain is mutually exclusive with offset.
An asset that reads 0 rows with no declared schema: makes the run a no-op - downstream stages are skipped and offsets stay unchanged.
Related pages
- Pipeline Spec Overview - the full spec model
- Transforms - shape the frames you just read
- Destinations - where the results go
- Checkpoints and Offsets - watermark semantics in depth