{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snowflake/main/json-schema/snowflake-sequence-schema.json",
  "title": "Sequence",
  "description": "A Snowflake sequence",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snowflake-sequence-api-openapi.yml#/components/schemas/Sequence",
  "type": "object",
  "properties": {
    "start": {
      "type": "integer",
      "format": "int64",
      "description": "First value returned by the sequence"
    },
    "increment": {
      "type": "integer",
      "format": "int64",
      "description": "Step interval of the sequence"
    },
    "ordered": {
      "type": "boolean",
      "description": "Whether or not the values are generated in increasing or decreasing order"
    },
    "comment": {
      "type": "string",
      "description": "Comment for the sequence"
    },
    "name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "description": "Name of the sequence"
    },
    "created_on": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Date and time when the sequence was created."
    },
    "database_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Database in which the sequence is stored"
    },
    "schema_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Schema in which the sequence is stored"
    },
    "owner": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Role that owns the sequence"
    },
    "owner_role_type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of role that owns the sequence"
    }
  },
  "required": [
    "name"
  ]
}