Class StorageParameter
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
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:
Database myDatabase; S3Table.Builder.create(this, "MyTable") .storageParameters(List.of(StorageParameter.skipHeaderLineCount(1), StorageParameter.compressionType(CompressionType.GZIP), StorageParameter.custom("separatorChar", ","))) // ... .database(myDatabase) .columns(List.of(Column.builder() .name("col1") .type(Schema.STRING) .build())) .dataFormat(DataFormat.JSON) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
StorageParameter
(String key, String value) protected
StorageParameter
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
StorageParameter
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic StorageParameter
(experimental) Identifies if the file contains less or more values for a row than the number of columns specified in the external table definition.static StorageParameter
compressionType
(CompressionType value) (experimental) The type of compression used on the table, when the file name does not contain an extension.static StorageParameter
(experimental) A custom storage parameter.static StorageParameter
dataCleansingEnabled
(Boolean value) (experimental) Determines whether data handling is on for the table.getKey()
getValue()
static StorageParameter
(experimental) Specifies the action to perform when query results contain invalid UTF-8 character values.static StorageParameter
(experimental) Specifies the action to perform when ORC data contains an integer (for example, BIGINT or int64) that is larger than the column definition (for example, SMALLINT or int16).static StorageParameter
(experimental) A property that sets the numRows value for the table definition.static StorageParameter
(experimental) A property that sets the column mapping type for tables that use ORC data format.static StorageParameter
replacementChar
(String value) (experimental) Specifies the replacement character to use when you setINVALID_CHAR_HANDLING
toREPLACE
.static StorageParameter
serializationNullFormat
(String value) (experimental) A property that sets number of rows to skip at the beginning of each source file.static StorageParameter
skipHeaderLineCount
(Number value) (experimental) The number of rows to skip at the top of a CSV file when the table is being created.static StorageParameter
(experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARBYTE data.static StorageParameter
(experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARCHAR, CHAR, or string data.static StorageParameter
writeKmsKeyId
(String value) (experimental) You can specify an AWS Key Management Service key to enable Server–Side Encryption (SSE) for Amazon S3 objects.static StorageParameter
writeMaxFileSizeMb
(Number value) (experimental) A property that sets the maximum size (in MB) of each file written to Amazon S3 by CREATE EXTERNAL TABLE AS.static StorageParameter
writeParallel
(WriteParallel value) (experimental) A property that sets whether CREATE EXTERNAL TABLE AS should write data in parallel.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
StorageParameter
protected StorageParameter(software.amazon.jsii.JsiiObjectRef objRef) -
StorageParameter
protected StorageParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
StorageParameter
- Parameters:
key
- This parameter is required.value
- This parameter is required.
-
-
Method Details
-
columnCountMismatchHandling
@Stability(Experimental) @NotNull public static StorageParameter columnCountMismatchHandling(@NotNull ColumnCountMismatchHandlingAction value) (experimental) Identifies if the file contains less or more values for a row than the number of columns specified in the external table definition.This property is only available for an uncompressed text file format.
- Parameters:
value
- This parameter is required.
-
compressionType
@Stability(Experimental) @NotNull public static StorageParameter compressionType(@NotNull CompressionType value) (experimental) The type of compression used on the table, when the file name does not contain an extension.This value overrides the compression type specified through the extension.
- Parameters:
value
- This parameter is required.
-
custom
@Stability(Experimental) @NotNull public static StorageParameter custom(@NotNull String key, @NotNull Object value) (experimental) A custom storage parameter.- Parameters:
key
-- The key of the storage parameter.
value
-- The value of the storage parameter.
-
dataCleansingEnabled
@Stability(Experimental) @NotNull public static StorageParameter dataCleansingEnabled(@NotNull Boolean value) (experimental) Determines whether data handling is on for the table.- Parameters:
value
- This parameter is required.
-
invalidCharHandling
@Stability(Experimental) @NotNull public static StorageParameter invalidCharHandling(@NotNull InvalidCharHandlingAction value) (experimental) Specifies the action to perform when query results contain invalid UTF-8 character values.- Parameters:
value
- This parameter is required.
-
numericOverflowHandling
@Stability(Experimental) @NotNull public static StorageParameter numericOverflowHandling(@NotNull NumericOverflowHandlingAction value) (experimental) Specifies the action to perform when ORC data contains an integer (for example, BIGINT or int64) that is larger than the column definition (for example, SMALLINT or int16).- Parameters:
value
- This parameter is required.
-
numRows
(experimental) A property that sets the numRows value for the table definition.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.
- Parameters:
value
- This parameter is required.
-
orcSchemaResolution
@Stability(Experimental) @NotNull public static StorageParameter orcSchemaResolution(@NotNull OrcColumnMappingType value) (experimental) A property that sets the column mapping type for tables that use ORC data format.This property is ignored for other data formats. If this property is omitted, columns are mapped by
OrcColumnMappingType.NAME
by default.Default: OrcColumnMappingType.NAME
- Parameters:
value
- This parameter is required.
-
replacementChar
@Stability(Experimental) @NotNull public static StorageParameter replacementChar(@NotNull String value) (experimental) Specifies the replacement character to use when you setINVALID_CHAR_HANDLING
toREPLACE
.- Parameters:
value
- This parameter is required.
-
serializationNullFormat
@Stability(Experimental) @NotNull public static StorageParameter serializationNullFormat(@NotNull String value) (experimental) A property that sets number of rows to skip at the beginning of each source file.- Parameters:
value
- This parameter is required.
-
skipHeaderLineCount
@Stability(Experimental) @NotNull public static StorageParameter skipHeaderLineCount(@NotNull Number value) (experimental) The number of rows to skip at the top of a CSV file when the table is being created.- Parameters:
value
- This parameter is required.
-
surplusBytesHandling
@Stability(Experimental) @NotNull public static StorageParameter surplusBytesHandling(@NotNull SurplusBytesHandlingAction value) (experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARBYTE data.By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
- Parameters:
value
- This parameter is required.
-
surplusCharHandling
@Stability(Experimental) @NotNull public static StorageParameter surplusCharHandling(@NotNull SurplusCharHandlingAction value) (experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARCHAR, CHAR, or string data.By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
- Parameters:
value
- This parameter is required.
-
writeKmsKeyId
@Stability(Experimental) @NotNull public static StorageParameter writeKmsKeyId(@NotNull String value) (experimental) You can specify an AWS Key Management Service key to enable Server–Side Encryption (SSE) for Amazon S3 objects.- Parameters:
value
- This parameter is required.
-
writeMaxFileSizeMb
@Stability(Experimental) @NotNull public static StorageParameter writeMaxFileSizeMb(@NotNull Number value) (experimental) A property that sets the maximum size (in MB) of each file written to Amazon S3 by CREATE EXTERNAL TABLE AS.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.
- Parameters:
value
- This parameter is required.
-
writeParallel
@Stability(Experimental) @NotNull public static StorageParameter writeParallel(@NotNull WriteParallel value) (experimental) A property that sets whether CREATE EXTERNAL TABLE AS should write data in parallel.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.
Default: WriteParallel.ON
- Parameters:
value
- This parameter is required.
-
getKey
-
getValue
-