Class StorageParameter
(experimental) A storage parameter. The list of storage parameters available is not exhaustive and other keys may be used.
Inheritance
Namespace: Amazon.CDK.AWS.Glue.Alpha
Assembly: Amazon.CDK.AWS.Glue.Alpha.dll
Syntax (csharp)
public class StorageParameter : DeputyBase
Syntax (vb)
Public Class StorageParameter
Inherits DeputyBase
Remarks
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.
Stability: Experimental
See: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES"
ExampleMetadata: infused
Examples
Database myDatabase;
new S3Table(this, "MyTable", new S3TableProps {
StorageParameters = new [] { StorageParameter.SkipHeaderLineCount(1), StorageParameter.CompressionType(CompressionType.GZIP), StorageParameter.Custom("separatorChar", ",") },
// ...
Database = myDatabase,
Columns = new [] { new Column {
Name = "col1",
Type = Schema.STRING
} },
DataFormat = DataFormat.JSON
});
Synopsis
Constructors
StorageParameter(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
StorageParameter(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
StorageParameter(String, String) |
Properties
Key | |
Value |
Methods
ColumnCountMismatchHandling(ColumnCountMismatchHandlingAction) | (experimental) Identifies if the file contains less or more values for a row than the number of columns specified in the external table definition. |
CompressionType(CompressionType) | (experimental) The type of compression used on the table, when the file name does not contain an extension. |
Custom(String, Object) | (experimental) A custom storage parameter. |
DataCleansingEnabled(Boolean) | (experimental) Determines whether data handling is on for the table. |
InvalidCharHandling(InvalidCharHandlingAction) | (experimental) Specifies the action to perform when query results contain invalid UTF-8 character values. |
NumericOverflowHandling(NumericOverflowHandlingAction) | (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). |
NumRows(Double) | (experimental) A property that sets the numRows value for the table definition. |
OrcSchemaResolution(OrcColumnMappingType) | (experimental) A property that sets the column mapping type for tables that use ORC data format. |
ReplacementChar(String) | (experimental) Specifies the replacement character to use when you set |
SerializationNullFormat(String) | (experimental) A property that sets number of rows to skip at the beginning of each source file. |
SkipHeaderLineCount(Double) | (experimental) The number of rows to skip at the top of a CSV file when the table is being created. |
SurplusBytesHandling(SurplusBytesHandlingAction) | (experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARBYTE data. |
SurplusCharHandling(SurplusCharHandlingAction) | (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. |
WriteKmsKeyId(String) | (experimental) You can specify an AWS Key Management Service key to enable Server–Side Encryption (SSE) for Amazon S3 objects. |
WriteMaxFileSizeMb(Double) | (experimental) A property that sets the maximum size (in MB) of each file written to Amazon S3 by CREATE EXTERNAL TABLE AS. |
WriteParallel(WriteParallel) | (experimental) A property that sets whether CREATE EXTERNAL TABLE AS should write data in parallel. |
Constructors
StorageParameter(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected StorageParameter(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
StorageParameter(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected StorageParameter(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
StorageParameter(String, String)
public StorageParameter(string key, string value)
Parameters
- key System.String
- value System.String
Remarks
Stability: Experimental
Properties
Key
public virtual string Key { get; }
Property Value
System.String
Remarks
Stability: Experimental
Value
public virtual string Value { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
ColumnCountMismatchHandling(ColumnCountMismatchHandlingAction)
(experimental) Identifies if the file contains less or more values for a row than the number of columns specified in the external table definition.
public static StorageParameter ColumnCountMismatchHandling(ColumnCountMismatchHandlingAction value)
Parameters
Returns
Remarks
This property is only available for an uncompressed text file format.
Stability: Experimental
CompressionType(CompressionType)
(experimental) The type of compression used on the table, when the file name does not contain an extension.
public static StorageParameter CompressionType(CompressionType value)
Parameters
- value CompressionType
Returns
Remarks
This value overrides the compression type specified through the extension.
Stability: Experimental
Custom(String, Object)
(experimental) A custom storage parameter.
public static StorageParameter Custom(string key, object value)
Parameters
- key System.String
- The key of the storage parameter.
- value System.Object
- The value of the storage parameter.
Returns
Remarks
Stability: Experimental
DataCleansingEnabled(Boolean)
(experimental) Determines whether data handling is on for the table.
public static StorageParameter DataCleansingEnabled(bool value)
Parameters
- value System.Boolean
Returns
Remarks
Stability: Experimental
InvalidCharHandling(InvalidCharHandlingAction)
(experimental) Specifies the action to perform when query results contain invalid UTF-8 character values.
public static StorageParameter InvalidCharHandling(InvalidCharHandlingAction value)
Parameters
Returns
Remarks
Stability: Experimental
NumericOverflowHandling(NumericOverflowHandlingAction)
(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).
public static StorageParameter NumericOverflowHandling(NumericOverflowHandlingAction value)
Parameters
Returns
Remarks
Stability: Experimental
NumRows(Double)
(experimental) A property that sets the numRows value for the table definition.
public static StorageParameter NumRows(double value)
Parameters
- value System.Double
Returns
Remarks
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.
Stability: Experimental
OrcSchemaResolution(OrcColumnMappingType)
(experimental) A property that sets the column mapping type for tables that use ORC data format.
public static StorageParameter OrcSchemaResolution(OrcColumnMappingType value)
Parameters
- value OrcColumnMappingType
Returns
Remarks
This property is ignored for other data formats. If this property is omitted, columns are mapped by OrcColumnMappingType.NAME
by default.
Default: OrcColumnMappingType.NAME
Stability: Experimental
ReplacementChar(String)
(experimental) Specifies the replacement character to use when you set INVALID_CHAR_HANDLING
to REPLACE
.
public static StorageParameter ReplacementChar(string value)
Parameters
- value System.String
Returns
Remarks
Stability: Experimental
SerializationNullFormat(String)
(experimental) A property that sets number of rows to skip at the beginning of each source file.
public static StorageParameter SerializationNullFormat(string value)
Parameters
- value System.String
Returns
Remarks
Stability: Experimental
SkipHeaderLineCount(Double)
(experimental) The number of rows to skip at the top of a CSV file when the table is being created.
public static StorageParameter SkipHeaderLineCount(double value)
Parameters
- value System.Double
Returns
Remarks
Stability: Experimental
SurplusBytesHandling(SurplusBytesHandlingAction)
(experimental) Specifies how to handle data being loaded that exceeds the length of the data type defined for columns containing VARBYTE data.
public static StorageParameter SurplusBytesHandling(SurplusBytesHandlingAction value)
Parameters
Returns
Remarks
By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
Stability: Experimental
SurplusCharHandling(SurplusCharHandlingAction)
(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.
public static StorageParameter SurplusCharHandling(SurplusCharHandlingAction value)
Parameters
Returns
Remarks
By default, Redshift Spectrum sets the value to null for data that exceeds the width of the column.
Stability: Experimental
WriteKmsKeyId(String)
(experimental) You can specify an AWS Key Management Service key to enable Server–Side Encryption (SSE) for Amazon S3 objects.
public static StorageParameter WriteKmsKeyId(string value)
Parameters
- value System.String
Returns
Remarks
Stability: Experimental
WriteMaxFileSizeMb(Double)
(experimental) A property that sets the maximum size (in MB) of each file written to Amazon S3 by CREATE EXTERNAL TABLE AS.
public static StorageParameter WriteMaxFileSizeMb(double value)
Parameters
- value System.Double
Returns
Remarks
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.
Stability: Experimental
WriteParallel(WriteParallel)
(experimental) A property that sets whether CREATE EXTERNAL TABLE AS should write data in parallel.
public static StorageParameter WriteParallel(WriteParallel value)
Parameters
- value WriteParallel
Returns
Remarks
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
Stability: Experimental