Skip to main content
Version: 0.7.x
fileINPUTBUFFERPROCESSOROUTPUT

File

The File input reads JSON / CSV / Parquet / Avro / Arrow files via DataFusion. It supports local paths and cloud object storage (S3, GCS, Azure, HTTP, HDFS), with optional SQL over the file data or integration with the Ballista distributed engine.

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "file" (the input kind)
input_typeobjectyes—Format and location, see below: type (json / csv / parquet / avro / arrow), path (file path or object storage URL), optional store (object storage configuration, tagged enum)
queryobjectno—SQL to run over the file data, see table below (top-level field)
ballistaobjectno—Distributed query configuration, see table below (top-level field)

Note: type, path, and store live inside input_type; query and ballista are siblings of input_type (top-level fields of the file input). The field name in the code is store (not object_store as in the old docs).

store​

store is a tagged enum (distinguished by the type field).

S3​

FieldTypeRequiredDefaultDescription
typestringyes—"s3"
bucket_namestringyes—S3 bucket name
access_key_idstringyes—AWS access key ID
secret_access_keystringyes—AWS secret access key
endpointstringno—Custom endpoint (MinIO, etc.)
regionstringno—AWS region
allow_httpbooleannofalseWhether to allow HTTP (non-TLS) connections

GCS (gs)​

FieldTypeRequiredDescription
typestringyes"gs"
bucket_namestringyesGCS bucket name
urlstringnoCustom endpoint: a gs://bucket URL for the same bucket, or an http(s):// endpoint for an emulator (the bucket stays bucket_name)
service_account_pathstringsee notePath to the service account JSON key file
service_account_keystringsee noteRaw service account JSON content

Exactly one of service_account_path / service_account_key is required: providing neither fails with "GCS auth is missing", and providing both fails with "Specify either … not both".

Azure (az)​

FieldTypeRequiredDescription
typestringyes"az"
accountstringyesStorage account name
container_namestringyesContainer name
endpointstringnoEndpoint
urlstringnoBlob endpoint URL
access_keystringnoStorage access key

HTTP​

FieldTypeRequiredDescription
typestringyes"http"
urlstringyesStore origin (scheme://host[:port]); any path prefix belongs in the data path (e.g. path: http://host/prefix/file.parquet)

HDFS​

FieldTypeRequiredDescription
typestringyes"hdfs"
urlstringyesHDFS namenode URL
ha_configmap<string, string>noHigh-availability configuration

query​

FieldTypeRequiredDefaultDescription
querystringyes—SQL query statement
tablestringno"flow"Table name under which the file data is registered

ballista​

FieldTypeRequiredDescription
remote_urlstringyesBallista server URL

Examples​

input:
type: "file"
input_type:
type: "json"
path: "/data/sensor_data.json"
input:
type: "file"
input_type:
type: "parquet"
path: "s3://my-bucket/data/sensor_readings.parquet"
store:
type: "s3"
region: "us-west-2"
bucket_name: "my-bucket"
access_key_id: "${AWS_ACCESS_KEY_ID}"
secret_access_key: "${AWS_SECRET_ACCESS_KEY}"
input:
type: "file"
input_type:
type: "csv"
path: "/data/sensors.csv"
query:
query: "SELECT sensor_id, AVG(temperature) as avg_temp FROM flow GROUP BY sensor_id"
table: "sensor_data"
input:
type: "file"
input_type:
type: "parquet"
path: "s3://analytics/data.parquet"
store:
type: "s3"
endpoint: "http://localhost:9000"
region: "us-east-1"
bucket_name: "analytics"
access_key_id: "minioadmin"
secret_access_key: "minioadmin"
allow_http: true
input:
type: "file"
input_type:
type: "csv"
path: "az://my-container/data/input.csv"
store:
type: "az"
account: "mystorageaccount"
container_name: "my-container"
access_key: "${AZURE_STORAGE_ACCESS_KEY}"

Read errors​

A read failure after rows have flowed is classified by cause: transient retrieval failures (IO errors, object-store outages) return Disconnection and the engine reconnects, re-reading the snapshot from its start; deterministic failures (a corrupt file, a schema error) fail the run with Error::Process instead of looping. Reaching the end of the data remains a clean EOF.