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')¶
Bases:
BaseModelConnection 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
Truewhen each file contains a single JSON object or array that spans multiple lines. Defaults toFalse(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 toFalseto read everything asSTRING.- 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].