class StorageParameter
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Glue.Alpha.StorageParameter |
![]() | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#StorageParameter |
![]() | software.amazon.awscdk.services.glue.alpha.StorageParameter |
![]() | aws_cdk.aws_glue_alpha.StorageParameter |
![]() | @aws-cdk/aws-glue-alpha ยป StorageParameter |
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.
See also: [https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES"](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES")
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,
});
Initializer (protected)
super(key: string, value: string)
Parameters
- key
string
- value
string
Properties
Name | Type | Description |
---|---|---|
key | string | |
value | string |
key
Type:
string
value
Type:
string
Methods
Name | Description |
---|---|
static column | Identifies if the file contains less or more values for a row than the number of columns specified in the external table definition. |
static compression | The type of compression used on the table, when the file name does not contain an extension. |
static custom(key, value) | A custom storage parameter. |
static data | Determines whether data handling is on for the table. |
static invalid | Specifies the action to perform when query results contain invalid UTF-8 character values. |
static num | A property that sets the numRows value for the table definition. |
static numeric | 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 orc | A property that sets the column mapping type for tables that use ORC data format. |
static replacement | Specifies the replacement character to use when you set INVALID_CHAR_HANDLING to REPLACE . |
static serialization | A property that sets number of rows to skip at the beginning of each source file. |
static skip | The number of rows to skip at the top of a CSV file when the table is being created. |
static surplus | Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARBYTE data. |
static surplus | 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 write | You can specify an AWS Key Management Service key to enable ServerโSide Encryption (SSE) for Amazon S3 objects. |
static write | A property that sets the maximum size (in MB) of each file written to Amazon S3 by CREATE EXTERNAL TABLE AS. |
static write | A property that sets whether CREATE EXTERNAL TABLE AS should write data in parallel. |
static columnCountMismatchHandling(value)
public static columnCountMismatchHandling(value: ColumnCountMismatchHandlingAction): StorageParameter
Parameters
Returns
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.
static compressionType(value)
public static compressionType(value: CompressionType): StorageParameter
Parameters
- value
Compression
Type
Returns
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.
static custom(key, value)
public static custom(key: string, value: any): StorageParameter
Parameters
- key
string
โ - The key of the storage parameter. - value
any
โ - The value of the storage parameter.
Returns
A custom storage parameter.
static dataCleansingEnabled(value)
public static dataCleansingEnabled(value: boolean): StorageParameter
Parameters
- value
boolean
Returns
Determines whether data handling is on for the table.
static invalidCharHandling(value)
public static invalidCharHandling(value: InvalidCharHandlingAction): StorageParameter
Parameters
Returns
Specifies the action to perform when query results contain invalid UTF-8 character values.
static numRows(value)
public static numRows(value: number): StorageParameter
Parameters
- value
number
Returns
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.
static numericOverflowHandling(value)
public static numericOverflowHandling(value: NumericOverflowHandlingAction): StorageParameter
Parameters
Returns
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 orcSchemaResolution(value)
public static orcSchemaResolution(value: OrcColumnMappingType): StorageParameter
Parameters
- value
Orc
Column Mapping Type
Returns
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.
static replacementChar(value)
public static replacementChar(value: string): StorageParameter
Parameters
- value
string
Returns
Specifies the replacement character to use when you set INVALID_CHAR_HANDLING
to REPLACE
.
static serializationNullFormat(value)
public static serializationNullFormat(value: string): StorageParameter
Parameters
- value
string
Returns
A property that sets number of rows to skip at the beginning of each source file.
static skipHeaderLineCount(value)
public static skipHeaderLineCount(value: number): StorageParameter
Parameters
- value
number
Returns
The number of rows to skip at the top of a CSV file when the table is being created.
static surplusBytesHandling(value)
public static surplusBytesHandling(value: SurplusBytesHandlingAction): StorageParameter
Parameters
Returns
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.
static surplusCharHandling(value)
public static surplusCharHandling(value: SurplusCharHandlingAction): StorageParameter
Parameters
Returns
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.
static writeKmsKeyId(value)
public static writeKmsKeyId(value: string): StorageParameter
Parameters
- value
string
Returns
You can specify an AWS Key Management Service key to enable ServerโSide Encryption (SSE) for Amazon S3 objects.
static writeMaxFileSizeMb(value)
public static writeMaxFileSizeMb(value: number): StorageParameter
Parameters
- value
number
Returns
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.
static writeParallel(value)
public static writeParallel(value: WriteParallel): StorageParameter
Parameters
- value
Write
Parallel
Returns
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.