StorageParameter Class
A storage parameter. The list of storage parameters available is not exhaustive and other keys may be used.
If you would like to specify a storage parameter that is not available as a static member of this class, use the StorageParameter.custom method.
The list of storage parameters currently known within the CDK is listed.
Example
declare const myDatabase: glue.Database;
new glue.S3Table(this, 'MyTable', {
storageParameters: [
glue.StorageParameter.skipHeaderLineCount(1),
glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
glue.StorageParameter.custom('separatorChar', ',')
],
// ...
database: myDatabase,
columns: [{
name: 'col1',
type: glue.Schema.STRING,
}],
dataFormat: glue.DataFormat.JSON,
});
Properties
Methods
columnCountMismatchHandling(value: ColumnCountMismatchHandlingAction): StorageParameter // chainable@staticmethod def column_count_mismatch_handling(value: ColumnCountMismatchHandlingAction) -> StorageParameterpublic static StorageParameter columnCountMismatchHandling(ColumnCountMismatchHandlingAction value)public static StorageParameter ColumnCountMismatchHandling(ColumnCountMismatchHandlingAction value)func ColumnCountMismatchHandling(Value ColumnCountMismatchHandlingAction) StorageParameterstatic#This property is only available for an uncompressed text file format.
compressionType(value: CompressionType): StorageParameter // chainable@staticmethod def compression_type(value: CompressionType) -> StorageParameterpublic static StorageParameter compressionType(CompressionType value)public static StorageParameter CompressionType(CompressionType value)func CompressionType(Value CompressionType) StorageParameterstatic#This value overrides the compression type specified through the extension.
custom(key: string, value: string): StorageParameter // chainable@staticmethod def custom(key: str, value: str) -> StorageParameterpublic static StorageParameter custom(String key, String value)public static StorageParameter Custom(string key, string value)func Custom(Key *string, Value *string) StorageParameterstatic#2 parameters
Parameters
keykeykeykeyKey— - The key of the storage parameter.valuevaluevaluevalueValue— - The value of the storage parameter.
dataCleansingEnabled(value: boolean): StorageParameter // chainable@staticmethod def data_cleansing_enabled(value: bool) -> StorageParameterpublic static StorageParameter dataCleansingEnabled(Boolean value)public static StorageParameter DataCleansingEnabled(bool value)func DataCleansingEnabled(Value *bool) StorageParameterstatic#invalidCharHandling(value: InvalidCharHandlingAction): StorageParameter // chainable@staticmethod def invalid_char_handling(value: InvalidCharHandlingAction) -> StorageParameterpublic static StorageParameter invalidCharHandling(InvalidCharHandlingAction value)public static StorageParameter InvalidCharHandling(InvalidCharHandlingAction value)func InvalidCharHandling(Value InvalidCharHandlingAction) StorageParameterstatic#numericOverflowHandling(value: NumericOverflowHandlingAction): StorageParameter // chainable@staticmethod def numeric_overflow_handling(value: NumericOverflowHandlingAction) -> StorageParameterpublic static StorageParameter numericOverflowHandling(NumericOverflowHandlingAction value)public static StorageParameter NumericOverflowHandling(NumericOverflowHandlingAction value)func NumericOverflowHandling(Value NumericOverflowHandlingAction) StorageParameterstatic#numRows(value: number): StorageParameter // chainable@staticmethod def num_rows(value: int | float) -> StorageParameterpublic static StorageParameter numRows(Number value)public static StorageParameter NumRows(double value)func NumRows(Value *float64) StorageParameterstatic#notes
To explicitly update an external table's statistics, set the numRows property to indicate the size of the table. Amazon Redshift doesn't analyze external tables to generate the table statistics that the query optimizer uses to generate a query plan. If table statistics aren't set for an external table, Amazon Redshift generates a query execution plan based on an assumption that external tables are the larger tables and local tables are the smaller tables.
orcSchemaResolution(value: OrcColumnMappingType): StorageParameter // chainable@staticmethod def orc_schema_resolution(value: OrcColumnMappingType) -> StorageParameterpublic static StorageParameter orcSchemaResolution(OrcColumnMappingType value)public static StorageParameter OrcSchemaResolution(OrcColumnMappingType value)func OrcSchemaResolution(Value OrcColumnMappingType) StorageParameterstatic#This property is ignored for other data formats. If this property is omitted, columns are mapped by OrcColumnMappingType.NAME by default.
replacementChar(value: string): StorageParameter // chainable@staticmethod def replacement_char(value: str) -> StorageParameterpublic static StorageParameter replacementChar(String value)public static StorageParameter ReplacementChar(string value)func ReplacementChar(Value *string) StorageParameterstatic#serializationNullFormat(value: string): StorageParameter // chainable@staticmethod def serialization_null_format(value: str) -> StorageParameterpublic static StorageParameter serializationNullFormat(String value)public static StorageParameter SerializationNullFormat(string value)func SerializationNullFormat(Value *string) StorageParameterstatic#skipHeaderLineCount(value: number): StorageParameter // chainable@staticmethod def skip_header_line_count(value: int | float) -> StorageParameterpublic static StorageParameter skipHeaderLineCount(Number value)public static StorageParameter SkipHeaderLineCount(double value)func SkipHeaderLineCount(Value *float64) StorageParameterstatic#surplusBytesHandling(value: SurplusBytesHandlingAction): StorageParameter // chainable@staticmethod def surplus_bytes_handling(value: SurplusBytesHandlingAction) -> StorageParameterpublic static StorageParameter surplusBytesHandling(SurplusBytesHandlingAction value)public static StorageParameter SurplusBytesHandling(SurplusBytesHandlingAction value)func SurplusBytesHandling(Value SurplusBytesHandlingAction) StorageParameterstatic#By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
surplusCharHandling(value: SurplusCharHandlingAction): StorageParameter // chainable@staticmethod def surplus_char_handling(value: SurplusCharHandlingAction) -> StorageParameterpublic static StorageParameter surplusCharHandling(SurplusCharHandlingAction value)public static StorageParameter SurplusCharHandling(SurplusCharHandlingAction value)func SurplusCharHandling(Value SurplusCharHandlingAction) StorageParameterstatic#By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
writeKmsKeyId(key: IKeyRef): StorageParameter // chainable@staticmethod def write_kms_key_id(key: IKeyRef) -> StorageParameterpublic static StorageParameter writeKmsKeyId(IKeyRef key)public static StorageParameter WriteKmsKeyId(IKeyRef key)func WriteKmsKeyId(Key IKeyRef) StorageParameterstatic#notes
Redshift Spectrum accepts either the key's ARN or its bare key ID for the write.kms.key.id property, and encrypts the written objects with that key; this renders the ARN. To use the S3 bucket's default KMS key instead, set the literal value auto via StorageParameter.custom('write.kms.key.id', 'auto') — this typed factory cannot express auto.
writeMaxFileSizeMb(value: number): StorageParameter // chainable@staticmethod def write_max_file_size_mb(value: int | float) -> StorageParameterpublic static StorageParameter writeMaxFileSizeMb(Number value)public static StorageParameter WriteMaxFileSizeMb(double value)func WriteMaxFileSizeMb(Value *float64) StorageParameterstatic#The size must be a valid integer between 5 and 6200. The default maximum file size is 6,200 MB. This table property also applies to any subsequent INSERT statement into the same external table.
writeParallel(value: WriteParallel): StorageParameter // chainable@staticmethod def write_parallel(value: WriteParallel) -> StorageParameterpublic static StorageParameter writeParallel(WriteParallel value)public static StorageParameter WriteParallel(WriteParallel value)func WriteParallel(Value WriteParallel) StorageParameterstatic#When 'write.parallel' is set to off, CREATE EXTERNAL TABLE AS writes to one or more data files serially onto Amazon S3. This table property also applies to any subsequent INSERT statement into the same external table.