Skip to main content
Version: 0.6.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—File format: json / csv / parquet / avro / arrow
pathstringyes—File path or object storage URL
storeobjectno—Object storage configuration (tagged enum), see table below
queryobjectno—SQL to run over the file data, see table below
ballistaobjectno—Distributed query configuration, see table below

Note: the field name in the code is store (not object_store as in the old docs). The format is specified by the top-level type field.

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
service_account_pathstringnoPath to the service account JSON key file
service_account_keystringnoRaw service account JSON content

Azure (az)​

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

HTTP​

FieldTypeRequiredDescription
typestringyes"http"
urlstringyesHTTP endpoint URL

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}"