{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/semantic-data-fabric-sdf-file/versions/1.0.json",
  "title": "Definition",
  "x-lintel": {
    "source": "https://cdn.sdf.com/schemas/sdf-schema-1.0.json",
    "sourceSha256": "234cabb966bb8549157bb43c77b72751bed7e94bca521468a8ef56ef9ab33f2e",
    "fileMatch": [
      "*.sdf.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "workspace": {
      "description": "A workspace definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Workspace"
        },
        {
          "type": "null"
        }
      ]
    },
    "profile": {
      "description": "A profile definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Profile"
        },
        {
          "type": "null"
        }
      ]
    },
    "catalog": {
      "description": "A catalog definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Catalog"
        },
        {
          "type": "null"
        }
      ]
    },
    "schema": {
      "description": "A schema definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Schema"
        },
        {
          "type": "null"
        }
      ]
    },
    "table": {
      "description": "A table definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Table"
        },
        {
          "type": "null"
        }
      ]
    },
    "policy": {
      "description": "A policy definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Policy"
        },
        {
          "type": "null"
        }
      ]
    },
    "classifier": {
      "description": "A classifier definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Classifier"
        },
        {
          "type": "null"
        }
      ]
    },
    "function": {
      "description": "A function definition",
      "anyOf": [
        {
          "$ref": "#/$defs/Function"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "Workspace": {
      "description": "A workspace is a collection of one or more catalogs, schemas, tables, and resources, called workspace members, that are managed together.",
      "type": "object",
      "required": [
        "edition"
      ],
      "properties": {
        "edition": {
          "description": "The SDF edition, should always be 1 (for now)",
          "type": "string"
        },
        "name": {
          "description": "The name of this workspace (defaults to the workspace directory name if not given) Name must be set for deployment.",
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "description": "A description of this workspace",
          "type": [
            "string",
            "null"
          ]
        },
        "repository": {
          "description": "The URL of the workspace source repository [defaults to 'none' if no repository is given]",
          "type": [
            "string",
            "null"
          ]
        },
        "remote-location": {
          "description": "The default output object store location, e.g. 's3://bucket/key/' where key is optional",
          "type": [
            "string",
            "null"
          ]
        },
        "includes": {
          "description": "An array of directories and filenames containing .sql and .sdf.yml files",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "excludes": {
          "description": "An array of directories and filenames to be skipped when resolving includes",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "references": {
          "description": "An array of paths to other workspaces, i.e. .sql and .yml files",
          "writeOnly": true,
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/WorkspacePath"
          }
        },
        "default-dialect": {
          "description": "The default dialect of this workspace. If not set, defaults to sdf dialect",
          "anyOf": [
            {
              "$ref": "#/$defs/Dialect"
            },
            {
              "type": "null"
            }
          ]
        },
        "resources": {
          "description": "An array of paths to directories and files, which will be copied to the SDF service on deployment",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "default-catalog": {
          "description": "Defines a default catalog [If not set, defaults to the directory of the workspace]",
          "type": [
            "string",
            "null"
          ]
        },
        "default-schema": {
          "description": "Defines a default schema [If not set, defaults to 'pub']",
          "type": [
            "string",
            "null"
          ]
        },
        "default-profile": {
          "description": "Defines the default profile [if not set, defaults to 'dbg']",
          "type": [
            "string",
            "null"
          ]
        },
        "defined-by": {
          "description": "[Derived] Workspace is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        },
        "variables": {
          "description": "An array of named values for setting SQL variables from your enviromnent Ex. -dt: dt, used in SQL as @dt",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Variable"
          }
        }
      },
      "additionalProperties": false
    },
    "FilePath": {
      "description": "All file path should either be relative to the workspace, or absolute for an object store like AWS s3://",
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "path": {
          "description": "A filepath",
          "type": "string"
        },
        "time": {
          "description": "Last modified of the file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/SystemTime"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "SystemTime": {
      "type": "object",
      "required": [
        "nanos_since_epoch",
        "secs_since_epoch"
      ],
      "properties": {
        "secs_since_epoch": {
          "type": "integer",
          "format": "uint64",
          "minimum": 0.0
        },
        "nanos_since_epoch": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0.0
        }
      }
    },
    "WorkspacePath": {
      "type": "object",
      "required": [
        "branch",
        "git",
        "path",
        "rev"
      ],
      "properties": {
        "path": {
          "description": "The relative path from this workspace to the referenced workspace, for a Git repo, from the root of the depot to the workspace",
          "type": "string"
        },
        "git": {
          "description": "The Git repo",
          "type": "string"
        },
        "rev": {
          "description": "the Git revision",
          "type": "string"
        },
        "branch": {
          "description": "the Git branch",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Dialect": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "redshift"
          ]
        },
        {
          "description": "SDF Dialect (which is ansi++)",
          "type": "string",
          "enum": [
            "sdf"
          ]
        },
        {
          "description": "Spark Dialect",
          "type": "string",
          "enum": [
            "spark"
          ]
        },
        {
          "description": "Presto dialect",
          "type": "string",
          "enum": [
            "presto"
          ]
        },
        {
          "description": "Postgres dialect",
          "type": "string",
          "enum": [
            "postgresql"
          ]
        },
        {
          "description": "BigQuery dialect",
          "type": "string",
          "enum": [
            "bigquery"
          ]
        },
        {
          "description": "LegacyBigQuery dialect",
          "type": "string",
          "enum": [
            "legacy-big-query"
          ]
        }
      ]
    },
    "Variable": {
      "description": "SQL queries can be parameterized via variables of type varchar. A variable definition binds the variable to the provided value.",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the variable",
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "description": "The value of this variable (using sql/yaml literals)",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Profile": {
      "description": "Profiles provide a way to alter the inclusion/exclusion of paths, resources and default dialect.",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "includes": {
          "description": "An array of directories and filenames containing .sql and .sdf.yml files",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "excludes": {
          "description": "An array of directories and filenames to be skipped when resolving includes",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "remote-location": {
          "description": "The default output object store location, e.g. 's3://bucket/dir/' where dir is optional",
          "type": [
            "string",
            "null"
          ]
        },
        "defined-by": {
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "Catalog": {
      "description": "Catalogs are named collections of schemas in an SQL-environment, and are defined via their includes/excludes and dialect",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "includes": {
          "description": "An array of directories and filenames containing .sql and .sdf.yml files",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "excludes": {
          "description": "An array of directories and filenames to be skipped when resolving includes",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "dialect": {
          "description": "The default dialect, defaults to `sdf` if not set",
          "anyOf": [
            {
              "$ref": "#/$defs/Dialect"
            },
            {
              "type": "null"
            }
          ]
        },
        "defined-by": {
          "description": "[Derived] Catalog is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "Schema": {
      "description": "Schemas are named collections of tables in an SQL-environment, and are defined via their includes/excludes and dialect",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "includes": {
          "description": "An array of directories and filenames containing .sql and .sdf.yml files",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "excludes": {
          "description": "An array of directories and filenames to be skipped when resolving includes",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "dialect": {
          "description": "The dialect, defaults to `sdf` if not set",
          "anyOf": [
            {
              "$ref": "#/$defs/Dialect"
            },
            {
              "type": "null"
            }
          ]
        },
        "defined-by": {
          "description": "[Derived] Schema is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Table": {
      "description": "A tables is either defined by given data (also called external table) or defined via a query.",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "includes": {
          "description": "An array of sql file names [Typically inferred]",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/FilePath"
          }
        },
        "dialect": {
          "description": "The dialect of this table, defaults to `sdf`",
          "anyOf": [
            {
              "$ref": "#/$defs/Dialect"
            },
            {
              "type": "null"
            }
          ]
        },
        "columns": {
          "description": "The columns of the schema: name, type, metadata",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Column"
          }
        },
        "partitioned-by": {
          "description": "The partitioning format of the table",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Partition"
          }
        },
        "schedule": {
          "description": "The schedule of the table [expressed as cron]",
          "type": [
            "string",
            "null"
          ]
        },
        "starting": {
          "description": "The first date of the table [expressed by prefixes of RFC 33]",
          "type": [
            "string",
            "null"
          ]
        },
        "classifiers": {
          "description": "An array of classifier references",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "lineage": {
          "description": "Lineage, a tagged array of column references",
          "anyOf": [
            {
              "$ref": "#/$defs/Lineage"
            },
            {
              "type": "null"
            }
          ]
        },
        "materialization": {
          "description": "The materialization scheme of this table",
          "anyOf": [
            {
              "$ref": "#/$defs/Materialization"
            },
            {
              "type": "null"
            }
          ]
        },
        "insert-into": {
          "description": "Store data under this catalog.schema.table instead of the original name",
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "description": "Data is at this location",
          "type": [
            "string",
            "null"
          ]
        },
        "file-format": {
          "description": "Store table in this format [only for external tables]",
          "anyOf": [
            {
              "$ref": "#/$defs/FileFormat"
            },
            {
              "type": "null"
            }
          ]
        },
        "with-header": {
          "description": "CSV data has a header [only for external tables]",
          "type": [
            "boolean",
            "null"
          ]
        },
        "delimiter": {
          "description": "CSV data is separated by this delimiter [only for external tables]",
          "type": [
            "string",
            "null"
          ]
        },
        "compression": {
          "description": "Json or CSV data is compressed with this method [only for external tables]",
          "anyOf": [
            {
              "$ref": "#/$defs/CompressionType"
            },
            {
              "type": "null"
            }
          ]
        },
        "defined-by": {
          "description": "[Derived] Table is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Column": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the column",
          "type": "string"
        },
        "description": {
          "description": "A description of this column",
          "type": [
            "string",
            "null"
          ]
        },
        "datatype": {
          "description": "The type of this column",
          "type": [
            "string",
            "null"
          ]
        },
        "nullable": {
          "description": "The type of this column",
          "type": [
            "boolean",
            "null"
          ]
        },
        "classifiers": {
          "description": "An array of classifier references",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "lineage": {
          "description": "Lineage, a tagged array of column references",
          "anyOf": [
            {
              "$ref": "#/$defs/Lineage"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Lineage": {
      "type": "object",
      "properties": {
        "copy": {
          "description": "The output column is computed by copying these upstream columns",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "modify": {
          "description": "The output column is computed by transforming these upstream columns",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "scan": {
          "description": "These upstream columns are indirectly used to produce the output (e.g. in WHERE or GROUP BY)",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "Partition": {
      "description": "A partition is a table column, used to describe to which partition this row belongs to",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the partition column",
          "type": "string"
        },
        "description": {
          "description": "A description of the partition column",
          "type": [
            "string",
            "null"
          ]
        },
        "format": {
          "description": "The format of the partition column [use strftime format for date/time] See (guide)[<https://docs.sdf.com/guide/schedules]>",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Materialization": {
      "oneOf": [
        {
          "description": "All derived tables are cached by default",
          "type": "string",
          "enum": [
            "cached"
          ]
        },
        {
          "description": "External tables must be explicitly marked When using 'Create external table` SQL syntax",
          "type": "string",
          "enum": [
            "external"
          ]
        },
        {
          "description": "View",
          "type": "string",
          "enum": [
            "view"
          ]
        },
        {
          "description": "Ephemeral",
          "type": "string",
          "enum": [
            "ephemeral"
          ]
        },
        {
          "description": "Recursive warehouse tables must be  explicitly  marked",
          "type": "string",
          "enum": [
            "recursive"
          ]
        }
      ]
    },
    "FileFormat": {
      "description": "Store table data in these formats",
      "type": "string",
      "enum": [
        "parquet",
        "csv",
        "json"
      ]
    },
    "CompressionType": {
      "description": "Compress table data using these methods",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "tar"
          ]
        },
        {
          "description": "BZIP2 Compression (.bz2)",
          "type": "string",
          "enum": [
            "bzip2"
          ]
        },
        {
          "description": "GZIP Compression (.gzip)",
          "type": "string",
          "enum": [
            "gzip"
          ]
        },
        {
          "description": "None, (default)",
          "type": "string",
          "enum": [
            "none"
          ]
        }
      ]
    },
    "Policy": {
      "description": "A policy is a an deny or allow expression that controls access to table.",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the policy",
          "type": "string"
        },
        "description": {
          "description": "A description of this policy",
          "type": [
            "string",
            "null"
          ]
        },
        "deny": {
          "description": "Deny data access based on this policy Each policy may have only one deny or allow element",
          "anyOf": [
            {
              "$ref": "#/$defs/Deny"
            },
            {
              "type": "null"
            }
          ]
        },
        "allow": {
          "description": "Allow data access based on this policy Each policy may have only one deny or allow element",
          "anyOf": [
            {
              "$ref": "#/$defs/Allow"
            },
            {
              "type": "null"
            }
          ]
        },
        "defined-by": {
          "description": "[Derived] Policy is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Deny": {
      "type": "object",
      "required": [
        "classifiers"
      ],
      "properties": {
        "classifiers": {
          "description": "Deny access when these classifiers are present",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "except": {
          "description": "except when these conditions hold",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/AllowTag"
          }
        }
      },
      "additionalProperties": false
    },
    "AllowTag": {
      "type": "object",
      "required": [
        "allow"
      ],
      "properties": {
        "allow": {
          "description": "Allow access when these classifiers are present",
          "allOf": [
            {
              "$ref": "#/$defs/Allow"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Allow": {
      "type": "object",
      "required": [
        "classifiers"
      ],
      "properties": {
        "classifiers": {
          "description": "Allow access when these classifiers are present",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "except": {
          "description": "except when these conditions hold",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/DenyTag"
          }
        }
      },
      "additionalProperties": false
    },
    "DenyTag": {
      "type": "object",
      "required": [
        "deny"
      ],
      "properties": {
        "deny": {
          "description": "Allow access when these classifiers are present",
          "allOf": [
            {
              "$ref": "#/$defs/Deny"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Classifier": {
      "description": "A classifier defines the labels that can be attached to columns or a table.",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the classifier type",
          "type": "string"
        },
        "description": {
          "description": "A description of this classifier type",
          "type": [
            "string",
            "null"
          ]
        },
        "elements": {
          "description": "Named classifier elements",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Element"
          }
        },
        "subsets": {
          "description": "Named subsets of classifier elements",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Subset"
          }
        },
        "defined-by": {
          "description": "[Derived] Classifier is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Element": {
      "description": "A classifier element is a scoped classifier label (e.g. the element PII belongs to the classifier scope data)",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the element",
          "type": "string"
        },
        "description": {
          "description": "A description of this classifier element",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Subset": {
      "description": "A classifier subset is a scoped classifier label; it is defined by multiple elements or subsets",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "The name of the classifier subset",
          "type": "string"
        },
        "description": {
          "description": "A description of the classifier subset",
          "type": [
            "string",
            "null"
          ]
        },
        "values": {
          "description": "The subset is defined by unionizing all its values, elements, or subsets",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "Function": {
      "description": "A function block defines the signature for user defined",
      "type": "object",
      "required": [
        "name",
        "parameters"
      ],
      "properties": {
        "name": {
          "description": "The name of the function [syntax: [[catalog.]schema].function]",
          "type": "string"
        },
        "dialect": {
          "description": "The dialect that provides this function",
          "anyOf": [
            {
              "$ref": "#/$defs/Dialect"
            },
            {
              "type": "null"
            }
          ]
        },
        "overload": {
          "description": "Override an existing function",
          "type": [
            "boolean",
            "null"
          ]
        },
        "description": {
          "description": "A description of this function",
          "type": [
            "string",
            "null"
          ]
        },
        "variadic": {
          "description": "Arbitrary number of arguments of an common type out of a list of valid types",
          "anyOf": [
            {
              "$ref": "#/$defs/Variadic"
            },
            {
              "type": "null"
            }
          ]
        },
        "kind": {
          "description": "The function kind",
          "anyOf": [
            {
              "$ref": "#/$defs/FunctionKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "parameters": {
          "description": "The arguments of this function",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Parameter"
          }
        },
        "returns": {
          "description": "The results of this function (can be a tuple)",
          "anyOf": [
            {
              "$ref": "#/$defs/Parameter"
            },
            {
              "type": "null"
            }
          ]
        },
        "with": {
          "description": "The generic type bounds",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TypeBound"
          }
        },
        "volatility": {
          "description": "volatility - The volatility of the function.",
          "anyOf": [
            {
              "$ref": "#/$defs/Volatility"
            },
            {
              "type": "null"
            }
          ]
        },
        "defined-by": {
          "description": "[Derived] Table is defined by this file",
          "writeOnly": true,
          "anyOf": [
            {
              "$ref": "#/$defs/FilePath"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Variadic": {
      "description": "Arbitrary number of arguments of an common type out of a list of valid types",
      "oneOf": [
        {
          "description": "All arguments have the same types",
          "type": "string",
          "enum": [
            "uniform"
          ]
        },
        {
          "description": "All even arguments have one type, odd arguments have another type",
          "type": "string",
          "enum": [
            "even-odd"
          ]
        }
      ]
    },
    "FunctionKind": {
      "type": "string",
      "enum": [
        "scalar",
        "aggregate",
        "window"
      ]
    },
    "Parameter": {
      "description": "A function parameter",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the parameter",
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "description": "A description of this parameter",
          "type": [
            "string",
            "null"
          ]
        },
        "datatype": {
          "description": "The datatype of this parameter",
          "type": [
            "string",
            "null"
          ]
        },
        "nullable": {
          "description": "The nullability of this column",
          "type": [
            "boolean",
            "null"
          ]
        },
        "classifier": {
          "description": "An array of classifier references",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "constant": {
          "description": "The required constant value of this parameter",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "TypeBound": {
      "type": "object",
      "required": [
        "generic",
        "is-one-of"
      ],
      "properties": {
        "generic": {
          "type": "string"
        },
        "is-one-of": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "Volatility": {
      "description": "A function's volatility, which defines the functions eligibility for certain optimizations",
      "oneOf": [
        {
          "description": "Pure - An pure function will always return the same output when given the same input.",
          "type": "string",
          "enum": [
            "pure"
          ]
        },
        {
          "description": "Stable - A stable function may return different values given the same input across different queries but must return the same value for a given input within a query.",
          "type": "string",
          "enum": [
            "stable"
          ]
        },
        {
          "description": "Volatile - A volatile function may change the return value from evaluation to evaluation. Multiple invocations of a volatile function may return different results when used in the same query.",
          "type": "string",
          "enum": [
            "volatile"
          ]
        }
      ]
    }
  },
  "additionalProperties": false
}
