JsonSourceOptions

Connection options for the JSON source connector.

class scamander.models.source_config.json.JsonSourceOptions(*, file_path: str, multiline: bool = False, infer_schema: bool = True, encoding: str = 'UTF-8')

Basisklassen: BaseModel

Connection options for the JSON source connector.

file_path

Path to a single JSON file, a directory of JSON files, or a glob pattern (e.g. "dbfs:/mnt/raw/events/*.json").

Type:

str

multiline

Set to True when each file contains a single JSON object or array that spans multiple lines. Defaults to False (each line is treated as a separate JSON record — JSONL/NDJSON).

Type:

bool

infer_schema

When True (default), Spark samples the data to infer column types. Set to False to read everything as STRING.

Type:

bool

encoding

Character encoding of the files. Defaults to "UTF-8".

Type:

str

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].