Data FlowData Flow
DataFlow
  • User Manual
  • Developer Manual
  • Examples
  • API Reference
Overview
Getting Started
Pipeline Authoring
    Pipeline Spec OverviewConnections
    Sources
      SourcesJDBC SourcesNoSQL SourcesFile System SourcesObject Storage SourcesAPI SourcesStream Sources
    Transforms
    Destinations
    Execution Settings
Execution
Deployment
Troubleshooting
Examples
Sources

API Sources

API sources read a REST response and can page through it with one of four pagination strategies.

Providers: rest

Asset fields

Every asset in this type carries these fields; provider and format values live under options.

FieldTypeDefaultNotes
name (required)string--
chainobject-Per-row iteration over a previously loaded asset. When set, offset is not allowed.
chain.from (required)string-FQN of a previous asset whose distinct rows drive per-row iteration (e.g. sources.source_name.asset_name).
chain.pass_columns (required)boolean-When true, prepend the parent row's columns onto every result row produced by that chained iteration.
chain.prepend_labelstring-Optional prefix concatenated onto passed parent column names to avoid name conflicts (e.g. 'right_').
url (required)string--
method (required)GET or POST or PUT or PATCH--
schemastring-Optional DDL schema definition for api-based sources. Format: 'field1 type1, field2 type2, ...' or multi-line string for better readability.
offsetobject--
offset.key (required)string--
offset.response_keystring--
offset.initial_value (required)string-Initial offset value.
offset.type (required)timestamp or datetime or date or integer or int or long or id or string or text or cursor or token or page--
offset.formatstring-Optional target format used to reformat the value extracted from response_key so it matches the requestParam format expected by the API. Applied only when type is 'timestamp' or 'integer'. For timestamp: 'iso8601' (default), 'epoch_millis', 'epoch_seconds', or any DateTimeFormatter pattern (e.g. 'yyyy-MM-dd'). For integer: any java.util.Formatter pattern (e.g. '%d', '%08d', '%x').
downloadable_filesobject-When present, switches to file-download mode. By default the asset url is a listing endpoint and each JSON response item must contain a downloadable file URL. With 'direct_download: true' the asset url response body is the file itself. Downloaded files are read into Spark as a single DataFrame, or returned as a metadata DataFrame when 'files_reading' is false.
downloadable_files.direct_downloadbooleanfalseIf true, the asset url response body IS the file itself - no listing JSON is parsed and 'url_field'/'name_field' are not used. Works with asset chaining: the url may contain {{column}} placeholders, and one file is downloaded per resolved url.
downloadable_files.file_namestring-Only for 'direct_download'. Name to give the downloaded file. Supports {{column}} placeholders resolved from the parent asset in chained mode (e.g. "{{name}}" or "{{id}}.csv"). If omitted, the name is taken from the Content-Disposition response header, then the last url path segment, then a generated name.
downloadable_files.files_readingbooleantrueIf true, reads downloaded files into a DataFrame using the specified 'format' and 'schema'. If false, returns a DataFrame with file metadata (e.g., original URL, filename, local path) without reading file contents.
downloadable_files.downloading_directorystring-Local directory for downloading files. If not specified, a system temp directory is used.
downloadable_files.ignore_missing_filesbooleanfalseWhen true, a missing remote file does not fail the run. In metadata mode (files_reading: false) a row is still emitted with original_url set and local_path null so missing files can be identified later. Default false.
downloadable_files.url_fieldstring-Field name in each response item containing the pre-authenticated download URL. Can be a JsonPointer path like '/results/0/value/url'.
downloadable_files.name_fieldstring-Field name in each response item containing the filename. Used with 'pattern' for glob filtering. Can be a JsonPointer path like '/results/0/value/name'.
downloadable_files.patternstring-Glob pattern applied to name_field. Only matching files are downloaded. Omit to download all items.
downloadable_files.formatcsv or json or parquet or orc or text or excel-Spark read format for the downloaded files.
downloadable_files.schemastring-Explicit schema for the downloaded files (e.g., 'field1 type1, field2 type2, ...'). Optional.
downloadable_files.read_optionsobject-Options passed to the Spark reader. Valid keys depend on the format.

Minimal example

A complete api source with one asset, written for provider rest:

Code
sources: - name: orders type: api provider: rest # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: auth: type: oauth2 credentials: token_url: <token_url> client_id: <client_id> client_secret: <client_secret> assets: - name: orders_raw url: https://api.example.com/v1/orders method: GET

Providers

rest

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
http_versionHTTP_1_1 or HTTP_2 or HTTP_3HTTP_2HTTP version to use for the API request.
ssl_verifybooleantrueVerify TLS certificates. Set to false to disable certificate and hostname validation (dev/testing only; applies to every call made through this connection, including chained file downloads).

auth is one of:

OAuth2 (client credentials)

FieldTypeDefaultNotes
type (required)oauth2--
credentials (required)object--
credentials.token_url (required)string-Token endpoint URL (e.g. https://login.microsoftonline.com/&#123;tenant&#125;/oauth2/v2.0/token).
credentials.client_id (required)string-OAuth2 application (client) ID.
credentials.client_secret (required)string-OAuth2 client secret.
credentials.client_secret_methodbasic or postbasicClient auth method: basic (default) or body.
credentials.scopestring-Scope string (e.g. 'https://graph.microsoft.com/.default').
credentials.token_fieldstringaccess_tokenField in the token response that holds the access token. Defaults to 'access_token'.

Bearer token

FieldTypeDefaultNotes
type (required)bearer--
credentials (required)object--
credentials.token (required)string-Static bearer token.

Basic auth

FieldTypeDefaultNotes
type (required)basic--
credentials (required)object--
credentials.user (required)string-Username.
credentials.password (required)string-Password.

API Key

FieldTypeDefaultNotes
type (required)api_key--
credentials (required)object--
credentials.key (required)string-API key value sent as the 'X-API-Key' header.

No auth

FieldTypeDefaultNotes
type (required)none--

Asset options

assets[].options:

FieldTypeDefaultNotes
headersarray-HTTP headers to include in the request. Key-value pairs where both keys and values are strings.
paramsarray-Array of query parameters. Each parameter has a name and value (string, number, or boolean).
bodystring-Request body content as a string.
response_pathstring-JSONPath expression to extract specific data from the API response. Maps to responsePath.
cursor_pathstring-JSONPath expression to extract the cursor token from the API response for cursor-based pagination.
max_fetch_sizeinteger-Maximum number of rows kept in the final DataFrame after the asset is read (Spark limit). Independent of pagination.limit.max_records, which caps how many records pagination accumulates (and trims to) while paging.
ignore_not_foundarray of object-List of error rules to treat as 'no record' instead of failing the run. A response is skipped if it matches ANY rule in the list (OR). A rule matches on 'status_code' alone, or on 'status_code' AND 'status_message' (regex against the response body) when 'status_message' is present (AND). Example: [{status_code: 404}, {status_code: 500, status_message: 'NoCorrespondenceFound'}].
ignore_not_found[].status_code (required)integer-HTTP status code to match. Range: 100 to 599.
ignore_not_found[].status_messagestring-Optional regular expression matched against the response body. When present, both 'status_code' and this must match (AND).

pagination is one of:

Page number

FieldTypeDefaultNotes
strategy (required)page_number-Increments a page counter (e.g. pageIndex=1,2,3).
param_locationquery or body or headerqueryWhich part of the request carries the pagination parameters below. When 'body', parameter names are JSON Pointers and an empty options.body is treated as {}.
page_num_param (required)object-Parameter carrying the page number, incremented by one after each request.
page_num_param.name (required)string-Name of the query parameter or header (e.g. 'pageIndex'), or a JSON Pointer into the request body when 'param_location' is 'body' (e.g. '/paging/pageIndex').
page_num_param.start_valueinteger1Page number sent on the first request. Set to 0 for APIs whose pages are zero-based. Minimum: 0.
page_size_param (required)object-Parameter carrying the records requested per page. Sent unchanged on every request.
page_size_param.name (required)string-Name of the query parameter or header (e.g. 'pageSize' or '$top'), or a JSON Pointer into the request body when 'param_location' is 'body' (e.g. '/paging/pageSize').
page_size_param.value (required)integer-The page size, sent unchanged on every request. Has no default, since the right page size depends entirely on the endpoint. Minimum: 1.

completion_on is one of:

Empty page

FieldTypeDefaultNotes
mechanismempty_page-Stop when a page has zero records.

Short page

FieldTypeDefaultNotes
mechanismshort_page-Stop when a page has fewer records than the page size.
page_size_path (required)string-JSONPath to the page size in the response (e.g. '$.pageSize').

Total pages

FieldTypeDefaultNotes
mechanismtotal_pages-Stop once the page count reported at total_pages_path has been read.
total_pages_path (required)string-JSONPath to the total page count in the response (e.g. '$.totalPages').

Total records

FieldTypeDefaultNotes
mechanismtotal_records-Stop once all records reported at total_records_path have been read.
total_records_path (required)string-JSONPath to the total record count in the response (e.g. '$.TotalCount').

Skip Records

FieldTypeDefaultNotes
strategy (required)skip_limit-Increments a record offset by the page size (e.g. $skip).
param_locationquery or body or headerqueryWhich part of the request carries the pagination parameters below. When 'body', parameter names are JSON Pointers and an empty options.body is treated as {}.
skip_param (required)object-Parameter carrying the number of records to skip, advanced by the page size after each request.
skip_param.name (required)string-Name of the query parameter or header (e.g. 'skip' or '$skip'), or a JSON Pointer into the request body when 'param_location' is 'body' (e.g. '/paging/skip').
skip_param.start_valueinteger0Record offset sent on the first request. Advanced by the page size after each request. Minimum: 0.
page_size_param (required)object-Parameter carrying the records requested per page. Sent unchanged on every request and used to advance skip_param.
page_size_param.name (required)string-Name of the query parameter or header (e.g. 'pageSize' or '$top'), or a JSON Pointer into the request body when 'param_location' is 'body' (e.g. '/paging/pageSize').
page_size_param.value (required)integer-The page size, sent unchanged on every request. Has no default, since the right page size depends entirely on the endpoint. Minimum: 1.

completion_on is one of:

Empty page

FieldTypeDefaultNotes
mechanismempty_page-Stop when a page has zero records.

Short page

FieldTypeDefaultNotes
mechanismshort_page-Stop when a page has fewer records than the page size.
page_size_path (required)string-JSONPath to the page size in the response (e.g. '$.pageSize').

Total pages

FieldTypeDefaultNotes
mechanismtotal_pages-Stop once the page count reported at total_pages_path has been read.
total_pages_path (required)string-JSONPath to the total page count in the response (e.g. '$.totalPages').

Total records

FieldTypeDefaultNotes
mechanismtotal_records-Stop once all records reported at total_records_path have been read.
total_records_path (required)string-JSONPath to the total record count in the response (e.g. '$.TotalCount').

Cursor

FieldTypeDefaultNotes
strategy (required)cursor-Sends a continuation token read out of the previous response.
param_locationquery or body or headerqueryWhich part of the request carries the cursor parameter below. When 'body', the parameter name is a JSON Pointer and an empty options.body is treated as {}.
cursor_param (required)object-Parameter carrying the continuation token. Omitted from the first request unless start_value is set; on later requests the token from cursor_path is sent.
cursor_param.name (required)string-Name of the query parameter or header (e.g. 'cursor' or 'X-Continuation'), or a JSON Pointer into the request body when 'param_location' is 'body' (e.g. '/paging/token').
cursor_param.start_valuestring-Optional token sent on the first request only. Omit for APIs that start cursor paging with no cursor param.
cursor_path (required)string-JSONPath expression locating the next-page token in the response body (e.g. '$.meta.next_cursor').
completion_onobject-How the loop detects it has read everything.
completion_on.mechanism (required)no_link or empty_pageno_linkno_link: stop when cursor_path resolves to null or is absent. empty_page: stop when a page has zero records (for APIs that keep returning a token past the last page).

Next link

FieldTypeDefaultNotes
strategy (required)next_link-Follows an absolute next-page URL returned by the response (e.g. @odata.nextLink).
next_link_path (required)string-JSONPath expression locating an absolute next-page URL in the response body (e.g. "$['@odata.nextLink']"). The URL is requested as-is, carrying its own query string.
completion_onobject-How the loop detects it has read everything.
completion_on.mechanism (required)no_link or empty_pageno_linkno_link: stop when next_link_path resolves to null or is absent. empty_page: stop when a page has zero records.

File format options

An asset's options depend on its format:

csv

Valid options for CSV output operations based on Spark CSV data source version 3.5.1

FieldTypeDefaultNotes
delimiterstring-Sets the single character used for separating fields.
encodingstring-For reading, decodes the CSV files by the given encoding type. For writing, specifies encoding (charset) of saved CSV files.
quotestring-Sets the single character used for escaping quoted values.
escapestring-Sets the single character used for escaping quotes inside an already quoted value.
commentstring-Sets the single character used for commenting out lines.
headerbooleantrueUses the first line as names of columns. Default: false.
infer_schemabooleantrueInfers the schema of the CSV file. Default: false. Maps to inferSchema.
prefer_dateboolean-Indicates whether date should be preferred over timestamp. Maps to preferDate.
enforce_schemaboolean-Indicates whether the schema should be enforced. Maps to enforceSchema.
ignore_leading_white_spaceboolean-Indicates whether leading whitespaces should be ignored. Maps to ignoreLeadingWhiteSpace.
ignore_trailing_white_spaceboolean-Indicates whether trailing whitespaces should be ignored. Maps to ignoreTrailingWhiteSpace.
null_valuestring-Sets the string representation of a null value. Maps to nullValue.
nan_valuestring-Sets the string representation of a NaN value. Maps to nanValue.
positive_infinitystring-Sets the string representation of a positive infinity value. Maps to positiveInf.
negative_infinitystring-Sets the string representation of a negative infinity value. Maps to negativeInf.
date_formatstring-Sets the string that indicates a date format. Maps to dateFormat.
timestamp_formatstring-Sets the string that indicates a timestamp format. Maps to timestampFormat.
timestamp_without_timezone_formatstring-Sets the string that indicates a timestamp without time zone format. Maps to timestampNTZFormat.
enable_date_time_parsing_fallbackboolean-Indicates whether to enable date time parsing fallback. Maps to enableDateTimeParsingFallback.
max_columnsinteger-Sets the maximum number of columns to read. Maps to maxColumns.
max_chars_per_columninteger-Sets the maximum number of characters to read for each column. Maps to maxCharsPerColumn.
modePERMISSIVE or DROPMALFORMED or FAILFAST-Sets the mode to use for parsing the CSV file. Default: PERMISSIVE.
column_name_of_corrupt_recordstring-Sets the name of the column to store the corrupt record. Maps to columnNameOfCorruptRecord.
multi_lineboolean-Indicates whether to enable multi line mode. Maps to multiLine.
char_to_escape_quote_escapingstring-Sets the character to escape quote escaping. Maps to charToEscapeQuoteEscaping.
sampling_rationumber-Defines fraction of rows used for schema inferring. Maps to samplingRatio.
empty_valuestring-Sets the string representation of an empty value. Maps to emptyValue.
localestring-Sets the locale to use for parsing dates and timestamps.
line_separatorstring-Defines the line separator that should be used for writing. Maps to lineSep.
unescaped_quote_handlingSTOP_AT_CLOSING_QUOTE or BACK_TO_DELIMITER or STOP_AT_DELIMITER or SKIP_VALUE or RAISE_ERROR-Compression codec to use when saving to file. Default: STOP_AT_DELIMITER. Maps to unescapedQuoteHandling.

excel

Valid options for reading Excel files via crealytics spark-excel

FieldTypeDefaultNotes
headerbooleantrueUse the first row as names of columns.
infer_schemabooleantrueInfers the schema of the Excel sheet. Maps to inferSchema.
sheet_namestring-Name of the sheet to read (e.g. 'Sheet1'). If not set, the first sheet is read. Maps to sheetName.
data_addressstring-Cell range to read in Excel format (e.g. "'My Sheet'!A1" or "A1"). Default: A1. Maps to dataAddress.
treat_empty_values_as_nullsbooleantrueWhether to treat empty cells as null. Maps to treatEmptyValuesAsNulls.
use_plain_number_formatbooleanfalseWhen true, format cells without rounding and scientific notation. Maps to usePlainNumberFormat.
set_error_cells_to_fallback_valuesbooleanfalseWhen true, ERROR cell values (e.g. #N/A) are converted to zero values of the column's data type. Maps to setErrorCellsToFallbackValues.
date_formatstring-Sets the string that indicates a date format. Maps to dateFormat.
timestamp_formatstring-Sets the string that indicates a timestamp format. Maps to timestampFormat.
excerpt_sizeinteger-Number of rows to use for schema inference. Maps to excerptSize.
add_color_columnsboolean-When true, adds color columns to the DataFrame. Default: false. Maps to addColorColumns.
max_rows_in_memoryinteger-Maximum number of rows to read into memory. When set, it uses a streaming reader which can help with big files. xls format files are not supported. Maps to maxRowsInMemory.
max_byte_array_sizeinteger-Maximum byte array size to read into memory. Maps to maxByteArraySize.
temp_file_thresholdinteger-Number of bytes at which a zip entry is regarded as too large for holding in memory and the data is put in a temp file instead. Maps to tempFileThreshold.
workbook_passwordstring-Password to access the workbook. Maps to workbookPassword.

json

Valid options for JSON asset operations based on Spark JSON data source version 3.5.1

FieldTypeDefaultNotes
allow_backslash_escaping_any_characterboolean-Allows accepting quoting of all characters using backslash quoting mechanism. Maps to allowBackslashEscapingAnyCharacter.
allow_commentsboolean-Allows Java/C++ style comments in JSON. Maps to allowComments.
allow_non_numeric_numbersboolean-Allows JSON parser to recognize set of "Not-a-Number" (NaN) tokens as legal floating number values. Maps to allowNonNumericNumbers.
allow_numeric_leading_zerosboolean-Allows (non-standard) JSON integers to start with additional zero(s). Maps to allowNumericLeadingZeros.
allow_single_quotesboolean-Allows single quotes in addition to number quotes. Maps to allowSingleQuotes.
allow_unquoted_control_charsboolean-Allows JSON Strings to contain unquoted control characters. Maps to allowUnquotedControlChars.
allow_unquoted_field_namesboolean-Allows unquoted field names in JSON. Maps to allowUnquotedFieldNames.
column_name_of_corrupt_recordstring-Sets the name of the column to store the corrupt record. Maps to columnNameOfCorruptRecord.
date_formatstring-Sets the string that indicates a date format. Default is "yyyy-MM-dd". Maps to dateFormat.
drop_field_if_all_nullboolean-Whether to ignore column of all null values or empty array/struct during schema inference. Maps to dropFieldIfAllNull.
enable_date_time_parsing_fallbackboolean-Indicates whether to enable date time parsing fallback. Maps to enableDateTimeParsingFallback.
encodingstring-For reading, decodes the JSON files by the given encoding type.
line_separatorstring-Defines the line separator for parsing JSON files. Maps to lineSep.
localestring-Sets the locale to use for parsing dates and timestamps.
modePERMISSIVE or DROPMALFORMED or FAILFAST-Sets the mode to use for parsing the JSON file. Default: PERMISSIVE.
multi_lineboolean-Parse one record, which may span multiple lines, per file. Maps to multiLine.
prefers_decimalboolean-Infers all floating-point values as a decimal type. Maps to prefersDecimal.
primitives_as_stringboolean-Infers all primitive values as a string type. Maps to primitivesAsString.
sampling_rationumber-Defines fraction of rows used for schema inferring. Maps to samplingRatio.
timestamp_formatstring-Sets the string that indicates a timestamp format. Default is "yyyy-MM-dd'T'HH:mm.SSS[XXX]". Maps to timestampFormat.
timestamp_without_timezone_formatstring-Sets the string that indicates a timestamp without time zone format. Default is "yyyy-MM-dd'T'HH:mm.SSS". Maps to timestampNTZFormat.
time_zonestring-Sets the string that indicates a time zone ID to be used to format timestamps. Maps to timeZone.

orc

Valid options for ORC asset operations based on Spark ORC data source version 3.5.1

FieldTypeDefaultNotes
merge_schemaboolean-Sets whether we should merge schemas collected from all ORC part-files. This will override spark.sql.orc.mergeSchema. Default: false. Maps to mergeSchema.

parquet

Valid options for Parquet asset operations based on Spark Parquet data source version 3.5.1

FieldTypeDefaultNotes
merge_schemaboolean-When true, merges schemas collected from all Parquet part-files. This will override spark.sql.parquet.mergeSchema. Maps to mergeSchema.
datetime_rebase_modeEXCEPTION or CORRECTED or LEGACY-The rebasing mode for the values of the DATE, TIMESTAMP_MILLIS, TIMESTAMP_MICROS logical types from the Julian to Proleptic Gregorian calendar. This will override spark.sql.parquet.datetimeRebaseModeInRead. Maps to datetimeRebaseMode.
int96_rebase_modeEXCEPTION or CORRECTED or LEGACY-The rebasing mode for the values of the INT96 timestamp type from the Julian to Proleptic Gregorian calendar. This will override spark.sql.parquet.int96RebaseModeInRead. Maps to int96RebaseMode.

text

Valid options for Text asset operations based on Spark Text data source version 3.5.1

FieldTypeDefaultNotes
whole_textboolean-If true, read each file from input path(s) as a single row. Maps to wholetext.
line_separatorstring-Defines the line separator that should be used for reading. Default handles all \r, \r\n and \n. Maps to lineSep.

Related pages

  • Sources
  • Connections
  • Pipeline Spec Overview
  • API Reference
Suggest edit
Last modified on November 26, 2026
Object Storage SourcesStream Sources
On this page
  • Asset fields
  • Minimal example
  • Providers
    • rest
  • File format options
    • csv
    • excel
    • json
    • orc
    • parquet
    • text
  • Related pages
YAML