

# Common data types
Common data types

The Common data types describes miscellaneous common data types in AWS Glue.

## Tag structure
Tag

The `Tag` object represents a label that you can assign to an AWS resource. Each tag consists of a key and an optional value, both of which you define.

For more information about tags, and controlling access to resources in AWS Glue, see [AWS Tags in AWS Glue](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) and [Specifying AWS Glue Resource ARNs](https://docs.aws.amazon.com/glue/latest/dg/glue-specifying-resource-arns.html) in the developer guide.

**Fields**
+ `key` – UTF-8 string, not less than 1 or more than 128 bytes long.

  The tag key. The key is required when you create a tag on an object. The key is case-sensitive, and must not contain the prefix aws.
+ `value` – UTF-8 string, not more than 256 bytes long.

  The tag value. The value is optional when you create a tag on an object. The value is case-sensitive, and must not contain the prefix aws.

## DecimalNumber structure
DecimalNumber

Contains a numeric value in decimal format.

**Fields**
+ `UnscaledValue` – *Required:* Blob.

  The unscaled numeric value.
+ `Scale` – *Required:* Number (integer).

  The scale that determines where the decimal point falls in the unscaled value.

## ErrorDetail structure
ErrorDetail

Contains details about an error.

**Fields**
+ `ErrorCode` – UTF-8 string, not less than 1 or more than 255 bytes long, matching the [Single-line string pattern](#aws-glue-api-regex-oneLine).

  The code associated with this error.
+ `ErrorMessage` – Description string, not more than 2048 bytes long, matching the [URI address multi-line string pattern](#aws-glue-api-regex-uri).

  A message describing the error.

## PropertyPredicate structure
PropertyPredicate

Defines a property predicate.

**Fields**
+ `Key` – Value string, not less than 1 or more than 1024 bytes long.

  The key of the property.
+ `Value` – Value string, not less than 1 or more than 1024 bytes long.

  The value of the property.
+ `Comparator` – UTF-8 string (valid values: `EQUALS` \$1 `GREATER_THAN` \$1 `LESS_THAN` \$1 `GREATER_THAN_EQUALS` \$1 `LESS_THAN_EQUALS`).

  The comparator used to compare this property to others.

## ResourceUri structure
ResourceUri

The URIs for function resources.

**Fields**
+ `ResourceType` – UTF-8 string (valid values: `JAR` \$1 `FILE` \$1 `ARCHIVE`).

  The type of the resource.
+ `Uri` – Uniform resource identifier (uri), not less than 1 or more than 1024 bytes long, matching the [URI address multi-line string pattern](#aws-glue-api-regex-uri).

  The URI for accessing the resource.

## ColumnStatistics structure
ColumnStatistics

Represents the generated column-level statistics for a table or partition.

**Fields**
+ `ColumnName` – *Required:* UTF-8 string, not less than 1 or more than 255 bytes long, matching the [Single-line string pattern](#aws-glue-api-regex-oneLine).

  Name of column which statistics belong to.
+ `ColumnType` – *Required:* Type name, not more than 20000 bytes long, matching the [Single-line string pattern](#aws-glue-api-regex-oneLine).

  The data type of the column.
+ `AnalyzedTime` – *Required:* Timestamp.

  The timestamp of when column statistics were generated.
+ `StatisticsData` – *Required:* A [ColumnStatisticsData](#aws-glue-api-common-ColumnStatisticsData) object.

  A `ColumnStatisticData` object that contains the statistics data values.

## ColumnStatisticsError structure
ColumnStatisticsError

Encapsulates a `ColumnStatistics` object that failed and the reason for failure.

**Fields**
+ `ColumnStatistics` – A [ColumnStatistics](#aws-glue-api-common-ColumnStatistics) object.

  The `ColumnStatistics` of the column.
+ `Error` – An [ErrorDetail](#aws-glue-api-common-ErrorDetail) object.

  An error message with the reason for the failure of an operation.

## ColumnError structure
ColumnError

Encapsulates a column name that failed and the reason for failure.

**Fields**
+ `ColumnName` – UTF-8 string, not less than 1 or more than 255 bytes long, matching the [Single-line string pattern](#aws-glue-api-regex-oneLine).

  The name of the column that failed.
+ `Error` – An [ErrorDetail](#aws-glue-api-common-ErrorDetail) object.

  An error message with the reason for the failure of an operation.

## ColumnStatisticsData structure
ColumnStatisticsData

Contains the individual types of column statistics data. Only one data object should be set and indicated by the `Type` attribute.

**Fields**
+ `Type` – *Required:* UTF-8 string (valid values: `BOOLEAN` \$1 `DATE` \$1 `DECIMAL` \$1 `DOUBLE` \$1 `LONG` \$1 `STRING` \$1 `BINARY`).

  The type of column statistics data.
+ `BooleanColumnStatisticsData` – A [BooleanColumnStatisticsData](#aws-glue-api-common-BooleanColumnStatisticsData) object.

  Boolean column statistics data.
+ `DateColumnStatisticsData` – A [DateColumnStatisticsData](#aws-glue-api-common-DateColumnStatisticsData) object.

  Date column statistics data.
+ `DecimalColumnStatisticsData` – A [DecimalColumnStatisticsData](#aws-glue-api-common-DecimalColumnStatisticsData) object.

   Decimal column statistics data. UnscaledValues within are Base64-encoded binary objects storing big-endian, two's complement representations of the decimal's unscaled value. 
+ `DoubleColumnStatisticsData` – A [DoubleColumnStatisticsData](#aws-glue-api-common-DoubleColumnStatisticsData) object.

  Double column statistics data.
+ `LongColumnStatisticsData` – A [LongColumnStatisticsData](#aws-glue-api-common-LongColumnStatisticsData) object.

  Long column statistics data.
+ `StringColumnStatisticsData` – A [StringColumnStatisticsData](#aws-glue-api-common-StringColumnStatisticsData) object.

  String column statistics data.
+ `BinaryColumnStatisticsData` – A [BinaryColumnStatisticsData](#aws-glue-api-common-BinaryColumnStatisticsData) object.

  Binary column statistics data.

## BooleanColumnStatisticsData structure
BooleanColumnStatisticsData

Defines column statistics supported for Boolean data columns.

**Fields**
+ `NumberOfTrues` – *Required:* Number (long), not more than None.

  The number of true values in the column.
+ `NumberOfFalses` – *Required:* Number (long), not more than None.

  The number of false values in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.

## DateColumnStatisticsData structure
DateColumnStatisticsData

Defines column statistics supported for timestamp data columns.

**Fields**
+ `MinimumValue` – Timestamp.

  The lowest value in the column.
+ `MaximumValue` – Timestamp.

  The highest value in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.
+ `NumberOfDistinctValues` – *Required:* Number (long), not more than None.

  The number of distinct values in a column.

## DecimalColumnStatisticsData structure
DecimalColumnStatisticsData

Defines column statistics supported for fixed-point number data columns.

**Fields**
+ `MinimumValue` – A [DecimalNumber](#aws-glue-api-common-DecimalNumber) object.

  The lowest value in the column.
+ `MaximumValue` – A [DecimalNumber](#aws-glue-api-common-DecimalNumber) object.

  The highest value in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.
+ `NumberOfDistinctValues` – *Required:* Number (long), not more than None.

  The number of distinct values in a column.

## DoubleColumnStatisticsData structure
DoubleColumnStatisticsData

Defines column statistics supported for floating-point number data columns.

**Fields**
+ `MinimumValue` – Number (double).

  The lowest value in the column.
+ `MaximumValue` – Number (double).

  The highest value in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.
+ `NumberOfDistinctValues` – *Required:* Number (long), not more than None.

  The number of distinct values in a column.

## LongColumnStatisticsData structure
LongColumnStatisticsData

Defines column statistics supported for integer data columns.

**Fields**
+ `MinimumValue` – Number (long).

  The lowest value in the column.
+ `MaximumValue` – Number (long).

  The highest value in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.
+ `NumberOfDistinctValues` – *Required:* Number (long), not more than None.

  The number of distinct values in a column.

## StringColumnStatisticsData structure
StringColumnStatisticsData

Defines column statistics supported for character sequence data values.

**Fields**
+ `MaximumLength` – *Required:* Number (long), not more than None.

  The size of the longest string in the column.
+ `AverageLength` – *Required:* Number (double), not more than None.

  The average string length in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.
+ `NumberOfDistinctValues` – *Required:* Number (long), not more than None.

  The number of distinct values in a column.

## BinaryColumnStatisticsData structure
BinaryColumnStatisticsData

Defines column statistics supported for bit sequence data values.

**Fields**
+ `MaximumLength` – *Required:* Number (long), not more than None.

  The size of the longest bit sequence in the column.
+ `AverageLength` – *Required:* Number (double), not more than None.

  The average bit sequence length in the column.
+ `NumberOfNulls` – *Required:* Number (long), not more than None.

  The number of null values in the column.

## String patterns
String patterns

The API uses the following regular expressions to define what is valid content for various string parameters and members:
+ Single-line string pattern – "`[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*`"
+ URI address multi-line string pattern – "`[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*`"
+ A Logstash Grok string pattern – "`[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\t]*`"
+ Identifier string pattern – "`[A-Za-z_][A-Za-z0-9_]*`"
+ AWS IAM ARN string pattern – "`arn:aws:iam::\d{12}:role/.*`"
+ Version string pattern – "`^[a-zA-Z0-9-_]+$`"
+ Log group string pattern – "`[\.\-_/#A-Za-z0-9]+`"
+ Log-stream string pattern – "`[^:*]*`"
+ Custom string pattern \$110 – "`[a-zA-Z0-9-_]+`"
+ Custom string pattern \$111 – "`[-a-zA-Z0-9+=/:_]*`"
+ Custom string pattern \$112 – "`[\S\s]*`"
+ Custom string pattern \$113 – "`.*\S.*`"
+ Custom string pattern \$114 – "`[a-zA-Z0-9-=._/@]+`"
+ Custom string pattern \$115 – "`[1-9][0-9]*|[1-9][0-9]*-[1-9][0-9]*`"
+ Custom string pattern \$116 – "`[A-Z][A-Za-z\.]+`"
+ Custom string pattern \$117 – "`[\S]*`"
+ Custom string pattern \$118 – "`[\w]*`"
+ Custom string pattern \$119 – "`arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+`"
+ Custom string pattern \$120 – "`subnet-[a-z0-9]+`"
+ Custom string pattern \$121 – "`\d{12}`"
+ Custom string pattern \$122 – "`([a-z]+)-([a-z]+-)?([a-z]+)-[0-9]+[a-z]+`"
+ Custom string pattern \$123 – "`[a-zA-Z0-9.-]*`"
+ Custom string pattern \$124 – "`arn:aws[a-z0-9\-]*:lambda:[a-z0-9\-]+:\d{12}:function:([\w\-]{1,64})`"
+ Custom string pattern \$125 – "`^(?!(.*[.\/\\]|aws:)).*$`"
+ Custom string pattern \$126 – "`[^\r\n]`"
+ Custom string pattern \$127 – "`^\w+\.\w+\.\w+$`"
+ Custom string pattern \$128 – "`^\w+\.\w+$`"
+ Custom string pattern \$129 – "`^$|arn:aws[a-z0-9-]*:kms:.*`"
+ Custom string pattern \$130 – "`arn:aws[^:]*:iam::[0-9]*:role/.+`"
+ Custom string pattern \$131 – "`[\.\-_A-Za-z0-9]+`"
+ Custom string pattern \$132 – "`^s3://([^/]+)/([^/]+/)*([^/]+)$`"
+ Custom string pattern \$133 – "`.*`"
+ Custom string pattern \$134 – "`^(Sun|Mon|Tue|Wed|Thu|Fri|Sat):([01]?[0-9]|2[0-3])$`"
+ Custom string pattern \$135 – "`[a-zA-Z0-9_.-]+`"
+ Custom string pattern \$136 – "`^arn:aws(-(cn|us-gov|eusc|iso(-[bef])?))?:secretsmanager:.*$`"
+ Custom string pattern \$137 – "`\S+`"
+ Custom string pattern \$138 – "`^[\x20-\x7E]*$`"
+ Custom string pattern \$139 – "`^([a-zA-Z0-9_=]+)\.([a-zA-Z0-9_=]+)\.([a-zA-Z0-9_\-\+\/=]*)`"
+ Custom string pattern \$140 – "`^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]`"
+ Custom string pattern \$141 – "`^(https?):\/\/[^\s/$.?#].[^\s]*$`"
+ Custom string pattern \$142 – "`arn:aws:kms:.*`"
+ Custom string pattern \$143 – "`^subnet-[a-z0-9]+$`"
+ Custom string pattern \$144 – "`[\p{L}\p{N}\p{P}]*`"
+ Custom string pattern \$145 – "`[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}`"
+ Custom string pattern \$146 – "`[a-zA-Z0-9-_$#.]+`"
+ Custom string pattern \$147 – "`^\d{12}$`"
+ Custom string pattern \$148 – "`^(\w+\.)+\w+$`"
+ Custom string pattern \$149 – "`^([2-3]|3[.]9)$`"
+ Custom string pattern \$150 – "`arn:aws(-(cn|us-gov|eusc|iso(-[bef])?))?:glue:.*`"
+ Custom string pattern \$151 – "`[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`"
+ Custom string pattern \$152 – "`(^arn:aws(-(cn|us-gov|eusc|iso(-[bef])?))?:iam::\w{12}:root)`"
+ Custom string pattern \$153 – "`^arn:aws(-(cn|us-gov|eusc|iso(-[bef])?))?:iam::[0-9]{12}:role/.+`"
+ Custom string pattern \$154 – "`[\s\S]*`"
+ Custom string pattern \$155 – "`([\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF]|[^\S\r\n"'= ;])*`"
+ Custom string pattern \$156 – "`^[A-Z\_]+$`"
+ Custom string pattern \$157 – "`^[A-Za-z0-9]+$`"
+ Custom string pattern \$158 – "`[*A-Za-z0-9_-]*`"
+ Custom string pattern \$159 – "`([\u0020-\u007E\r\s\n])*`"
+ Custom string pattern \$160 – "`[A-Za-z0-9_-]*`"
+ Custom string pattern \$161 – "`([\u0009\u000B\u000C\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF])*`"
+ Custom string pattern \$162 – "`([\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\s])*`"
+ Custom string pattern \$163 – "`([^\r\n])*`"