{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-glue-databrew/json-schema/amazon-glue-databrew-database-output-schema.json",
  "title": "DatabaseOutput",
  "description": "Represents a JDBC database output object which defines the output destination for a DataBrew recipe job to write into.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-glue-databrew-recipe-jobs-api-openapi.yml#/components/schemas/DatabaseOutput",
  "type": "object",
  "required": [
    "GlueConnectionName",
    "DatabaseOptions"
  ],
  "properties": {
    "GlueConnectionName": {
      "allOf": [
        {
          "$ref": "#/$defs/GlueConnectionName"
        },
        {
          "description": "The Glue connection that stores the connection information for the target database."
        }
      ]
    },
    "DatabaseOptions": {
      "allOf": [
        {
          "$ref": "#/$defs/DatabaseTableOutputOptions"
        },
        {
          "description": "Represents options that specify how and where DataBrew writes the database output generated by recipe jobs."
        }
      ]
    },
    "DatabaseOutputMode": {
      "allOf": [
        {
          "$ref": "#/$defs/DatabaseOutputMode"
        },
        {
          "description": "The output mode to write into the database. Currently supported option: NEW_TABLE."
        }
      ]
    }
  },
  "$defs": {
    "Bucket": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63
    },
    "BucketOwner": {
      "type": "string",
      "pattern": "^[0-9]{12}$",
      "minLength": 12,
      "maxLength": 12
    },
    "DatabaseOutputMode": {
      "type": "string",
      "enum": [
        "NEW_TABLE"
      ]
    },
    "DatabaseTableName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "DatabaseTableOutputOptions": {
      "type": "object",
      "required": [
        "TableName"
      ],
      "properties": {
        "TempDirectory": {
          "allOf": [
            {
              "$ref": "#/$defs/S3Location"
            },
            {
              "description": "Represents an Amazon S3 location (bucket name and object key) where DataBrew can store intermediate results."
            }
          ]
        },
        "TableName": {
          "allOf": [
            {
              "$ref": "#/$defs/DatabaseTableName"
            },
            {
              "description": "A prefix for the name of a table DataBrew will create in the database."
            }
          ]
        }
      },
      "description": "Represents options that specify how and where DataBrew writes the database output generated by recipe jobs."
    },
    "GlueConnectionName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "Key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1280
    },
    "S3Location": {
      "type": "object",
      "required": [
        "Bucket"
      ],
      "properties": {
        "Bucket": {
          "allOf": [
            {
              "$ref": "#/$defs/Bucket"
            },
            {
              "description": "The Amazon S3 bucket name."
            }
          ]
        },
        "Key": {
          "allOf": [
            {
              "$ref": "#/$defs/Key"
            },
            {
              "description": "The unique name of the object in the bucket."
            }
          ]
        },
        "BucketOwner": {
          "allOf": [
            {
              "$ref": "#/$defs/BucketOwner"
            },
            {
              "description": "The Amazon Web Services account ID of the bucket owner."
            }
          ]
        }
      },
      "description": "Represents an Amazon S3 location (bucket name, bucket owner, and object key) where DataBrew can read input data, or write output from a job."
    }
  }
}