Class DDBRecordMetadata
- java.lang.Object
-
- com.amazonaws.athena.connectors.dynamodb.util.DDBRecordMetadata
-
public class DDBRecordMetadata extends Object
This is primarily used for passing any table metadata that applies to the records when normalizing the data
-
-
Constructor Summary
Constructors Constructor Description DDBRecordMetadata(org.apache.arrow.vector.types.pojo.Schema schema)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getColumnNameMapping()StringgetDateTimeFormat(String columnName)Getter function that retrieves the date/datetime formatting for a specific column nameZoneIdgetDefaultTimeZone()Getter for default timezonebooleangetGlueTableContainedPreviouslyUnsupportedTypes()Set<String>getNonComparableColumns()retrieves the names of columns that have types that are not natively supported by glue/dynamodb and therefore needs to be excluded from the constraining clause in scan/query.booleanisContainsCoercibleType()returns whether the schema contains any type that can be coerciblestatic booleanisDateTimeFieldType(org.apache.arrow.vector.types.Types.MinorType fieldType)checks if the type is a datetime field typevoidsetDateTimeFormat(String columnName, String datetimeFormat)Setter function to add a inferred datetimeFormat to the datetimeFormatMapping for a specified column
-
-
-
Method Detail
-
getNonComparableColumns
public Set<String> getNonComparableColumns()
retrieves the names of columns that have types that are not natively supported by glue/dynamodb and therefore needs to be excluded from the constraining clause in scan/query.- Returns:
- set of strings containing names of columns with non-native types (such as timestamptz)
-
isContainsCoercibleType
public boolean isContainsCoercibleType()
returns whether the schema contains any type that can be coercible- Returns:
- boolean indicating existence of coercible type in schema
-
isDateTimeFieldType
public static boolean isDateTimeFieldType(org.apache.arrow.vector.types.Types.MinorType fieldType)
checks if the type is a datetime field type- Parameters:
fieldType- minorType to be checked- Returns:
- boolean true if its one of the three supported datetime types, otherwise false
-
getDateTimeFormat
public String getDateTimeFormat(String columnName)
Getter function that retrieves the date/datetime formatting for a specific column name- Parameters:
columnName- name of the column- Returns:
- the string that represents the date/datetime format
-
setDateTimeFormat
public void setDateTimeFormat(String columnName, String datetimeFormat)
Setter function to add a inferred datetimeFormat to the datetimeFormatMapping for a specified column- Parameters:
columnName- name of the column that contains data of date/datetime with datetimeFormatdatetimeFormat- inferred format of the date/datetime
-
getDefaultTimeZone
public ZoneId getDefaultTimeZone()
Getter for default timezone- Returns:
- default ZoneId to apply to date/datetime that does not have timezone already specified
-
getGlueTableContainedPreviouslyUnsupportedTypes
public boolean getGlueTableContainedPreviouslyUnsupportedTypes()
-
-