{
  "$id": "https://opendatafabric.org/schemas/sources/v1alpha1/SourceSpecInput",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "canonicalType": "https://opendatafabric.org/schemas/sources/v1alpha1/SourceSpec",
  "description": "Specifies an external source of data for ingestion.",
  "type": "object",
  "required": [
    "read"
  ],
  "properties": {
    "config": {
      "$ref": "https://opendatafabric.org/schemas/config/v1alpha1/ValueRefs",
      "description": "Brings the configuration values into the local `config` context.",
      "unevaluatedProperties": false
    },
    "ingress": {
      "$ref": "https://opendatafabric.org/schemas/sources/v1alpha1/Ingress",
      "description": "Determines where data is sourced from.",
      "unevaluatedProperties": false
    },
    "prepare": {
      "type": "array",
      "items": {
        "$ref": "https://opendatafabric.org/schemas/sources/v1alpha1/PrepStep",
        "unevaluatedProperties": false
      },
      "description": "Defines how raw data is prepared before reading."
    },
    "read": {
      "$ref": "https://opendatafabric.org/schemas/sources/v1alpha1/ReadStep",
      "description": "Defines how data is read into structured format.",
      "unevaluatedProperties": false
    },
    "preprocess": {
      "$ref": "https://opendatafabric.org/schemas/datasets/v1alpha1/Transform",
      "description": "Pre-processing query that shapes the data.",
      "unevaluatedProperties": false
    },
    "merge": {
      "$ref": "https://opendatafabric.org/schemas/sources/v1alpha1/MergeStrategy",
      "description": "Determines how newly-ingested data should be merged with existing history.",
      "unevaluatedProperties": false
    },
    "vocab": {
      "$ref": "https://opendatafabric.org/schemas/datasets/v1alpha1/DatasetVocabulary",
      "description": "Defines the mapping of system fields to dataset column names.",
      "unevaluatedProperties": false
    }
  }
}
