{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-timestream/json-schema/amazon-timestream-create-batch-load-task-request-schema.json",
  "title": "CreateBatchLoadTaskRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-timestream-batch-load-task-api-openapi.yml#/components/schemas/CreateBatchLoadTaskRequest",
  "type": "object",
  "properties": {
    "ClientToken": {
      "type": "string"
    },
    "DataModelConfiguration": {
      "$ref": "#/$defs/DataModelConfiguration"
    },
    "DataSourceConfiguration": {
      "$ref": "#/$defs/DataSourceConfiguration"
    },
    "ReportConfiguration": {
      "$ref": "#/$defs/ReportConfiguration"
    },
    "TargetDatabaseName": {
      "type": "string",
      "description": "Target Timestream database for a batch load task."
    },
    "TargetTableName": {
      "type": "string",
      "description": "Target Timestream table for a batch load task."
    },
    "RecordVersion": {
      "type": "integer"
    }
  },
  "required": [
    "DataSourceConfiguration",
    "ReportConfiguration",
    "TargetDatabaseName",
    "TargetTableName"
  ],
  "$defs": {
    "CsvConfiguration": {
      "type": "object",
      "properties": {
        "ColumnSeparator": {
          "type": "string",
          "description": "Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or blank space (' ')."
        },
        "EscapeChar": {
          "type": "string",
          "description": "Escape character can be one of"
        },
        "QuoteChar": {
          "type": "string",
          "description": "Can be single quote (') or double quote (\")."
        },
        "NullValue": {
          "type": "string",
          "description": "Can be blank space (' ')."
        },
        "TrimWhiteSpace": {
          "type": "boolean",
          "description": "Specifies to trim leading and trailing white space."
        }
      }
    },
    "DataModel": {
      "type": "object",
      "properties": {
        "TimeColumn": {
          "type": "string",
          "description": "Source column to be mapped to time."
        },
        "TimeUnit": {
          "type": "string",
          "enum": [
            "MILLISECONDS",
            "SECONDS",
            "MICROSECONDS",
            "NANOSECONDS"
          ],
          "description": "The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS."
        },
        "DimensionMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IngestTimestreamDimensionMapping"
          },
          "description": "Source to target mappings for dimensions."
        },
        "MultiMeasureMappings": {
          "$ref": "#/$defs/IngestTimestreamMultiMeasureMappings"
        },
        "MixedMeasureMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IngestTimestreamMixedMeasureMapping"
          },
          "description": "Source to target mappings for measures."
        },
        "MeasureNameColumn": {
          "type": "string"
        }
      },
      "required": [
        "DimensionMappings"
      ]
    },
    "DataModelConfiguration": {
      "type": "object",
      "properties": {
        "DataModel": {
          "$ref": "#/$defs/DataModel"
        },
        "DataModelS3Configuration": {
          "$ref": "#/$defs/DataModelS3Configuration"
        }
      }
    },
    "DataModelS3Configuration": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string"
        },
        "ObjectKey": {
          "type": "string"
        }
      }
    },
    "DataSourceConfiguration": {
      "type": "object",
      "properties": {
        "DataSourceS3Configuration": {
          "$ref": "#/$defs/DataSourceS3Configuration"
        },
        "CsvConfiguration": {
          "$ref": "#/$defs/CsvConfiguration"
        },
        "DataFormat": {
          "type": "string",
          "enum": [
            "CSV"
          ],
          "description": "This is currently CSV."
        }
      },
      "required": [
        "DataSourceS3Configuration",
        "DataFormat"
      ]
    },
    "DataSourceS3Configuration": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string",
          "description": "The bucket name of the customer S3 bucket."
        },
        "ObjectKeyPrefix": {
          "type": "string"
        }
      },
      "required": [
        "BucketName"
      ]
    },
    "IngestTimestreamDimensionMapping": {
      "type": "object",
      "properties": {
        "SourceColumn": {
          "type": "string"
        },
        "DestinationColumn": {
          "type": "string"
        }
      }
    },
    "IngestTimestreamMixedMeasureMapping": {
      "type": "object",
      "properties": {
        "MeasureName": {
          "type": "string"
        },
        "SourceColumn": {
          "type": "string"
        },
        "TargetMeasureName": {
          "type": "string"
        },
        "MeasureValueType": {
          "type": "string",
          "enum": [
            "DOUBLE",
            "BIGINT",
            "VARCHAR",
            "BOOLEAN",
            "TIMESTAMP",
            "MULTI"
          ]
        },
        "MultiMeasureAttributeMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IngestTimestreamMultiMeasureAttributeMapping"
          }
        }
      },
      "required": [
        "MeasureValueType"
      ]
    },
    "IngestTimestreamMultiMeasureAttributeMapping": {
      "type": "object",
      "properties": {
        "SourceColumn": {
          "type": "string"
        },
        "TargetMultiMeasureAttributeName": {
          "type": "string"
        },
        "MeasureValueType": {
          "type": "string",
          "enum": [
            "DOUBLE",
            "BIGINT",
            "BOOLEAN",
            "VARCHAR",
            "TIMESTAMP"
          ]
        }
      },
      "required": [
        "SourceColumn"
      ]
    },
    "IngestTimestreamMultiMeasureMappings": {
      "type": "object",
      "properties": {
        "TargetMultiMeasureName": {
          "type": "string"
        },
        "MultiMeasureAttributeMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IngestTimestreamMultiMeasureAttributeMapping"
          }
        }
      },
      "required": [
        "MultiMeasureAttributeMappings"
      ]
    },
    "ReportConfiguration": {
      "type": "object",
      "properties": {
        "ReportS3Configuration": {
          "$ref": "#/$defs/ReportS3Configuration"
        }
      }
    },
    "ReportS3Configuration": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string"
        },
        "ObjectKeyPrefix": {
          "type": "string"
        },
        "EncryptionOption": {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS"
          ]
        },
        "KmsKeyId": {
          "type": "string"
        }
      },
      "required": [
        "BucketName"
      ]
    }
  }
}