{
  "$id": "https://opendatafabric.org/schemas/legacy/v0/AddPushSource",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Describes how to ingest data into a root dataset from a certain logical source.",
  "type": "object",
  "required": [
    "sourceName",
    "read",
    "merge"
  ],
  "properties": {
    "sourceName": {
      "type": "string",
      "description": "Identifies the source within this dataset."
    },
    "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
    }
  }
}
