{
  "$id": "https://opendatafabric.org/schemas/legacy/v0/SetPollingSource",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Contains information on how externally-hosted data can be ingested into the root dataset.",
  "type": "object",
  "required": [
    "fetch",
    "read",
    "merge"
  ],
  "properties": {
    "fetch": {
      "$ref": "https://opendatafabric.org/schemas/legacy/v0/FetchStep",
      "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
    }
  }
}
