Skip to main content
Version: Next

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
typestringyesFile format: json / csv / parquet / avro / arrow
pathstringyesFile path or object storage URL
storeobjectnoObject storage configuration (tagged enum), see table below
queryobjectnoSQL to run over the file data, see table below
ballistaobjectnoDistributed 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_namestringyesS3 bucket name
access_key_idstringyesAWS access key ID
secret_access_keystringyesAWS secret access key
endpointstringnoCustom endpoint (MinIO, etc.)
regionstringnoAWS 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
querystringyesSQL query statement
tablestringno"flow"Table name under which the file data is registered

ballista

FieldTypeRequiredDescription
remote_urlstringyesBallista server URL

Examples

input:
type: "json"
path: "/data/sensor_data.json"
input:
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: "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: "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: "csv"
path: "az://my-container/data/input.csv"
store:
type: "az"
account: "mystorageaccount"
container_name: "my-container"
access_key: "${AZURE_STORAGE_ACCESS_KEY}"