Class ExternalTable.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExternalTable>
- Enclosing class:
ExternalTable
ExternalTable
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
(experimental) Columns of the table.compressed
(Boolean compressed) (experimental) Indicates whether the table's data is compressed or not.connection
(IConnection connection) (experimental) The connection the table will use when performing reads and writes.static ExternalTable.Builder
(experimental) Database in which to store the table.dataFormat
(DataFormat dataFormat) (experimental) Storage type of the table's data.description
(String description) (experimental) Description of the table.enablePartitionFiltering
(Boolean enablePartitionFiltering) (experimental) Enables partition filtering.externalDataLocation
(String externalDataLocation) (experimental) The data source location of the glue table, (e.g.parameters
(Map<String, String> parameters) (experimental) The key/value pairs define properties associated with the table.partitionIndexes
(List<? extends PartitionIndex> partitionIndexes) (experimental) Partition indexes on the table.partitionKeys
(List<? extends Column> partitionKeys) (experimental) Partition columns of the table.storageParameters
(List<? extends StorageParameter> storageParameters) (experimental) The user-supplied properties for the description of the physical storage of this table.storedAsSubDirectories
(Boolean storedAsSubDirectories) (experimental) Indicates whether the table data is stored in subdirectories.(experimental) Name of the table.
-
Method Details
-
create
@Stability(Experimental) public static ExternalTable.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ExternalTable.Builder
.
-
columns
(experimental) Columns of the table.- Parameters:
columns
- Columns of the table. This parameter is required.- Returns:
this
-
database
(experimental) Database in which to store the table.- Parameters:
database
- Database in which to store the table. This parameter is required.- Returns:
this
-
dataFormat
(experimental) Storage type of the table's data.- Parameters:
dataFormat
- Storage type of the table's data. This parameter is required.- Returns:
this
-
compressed
(experimental) Indicates whether the table's data is compressed or not.Default: false
- Parameters:
compressed
- Indicates whether the table's data is compressed or not. This parameter is required.- Returns:
this
-
description
(experimental) Description of the table.Default: generated
- Parameters:
description
- Description of the table. This parameter is required.- Returns:
this
-
enablePartitionFiltering
@Stability(Experimental) public ExternalTable.Builder enablePartitionFiltering(Boolean enablePartitionFiltering) (experimental) Enables partition filtering.Default: - The parameter is not defined
- Parameters:
enablePartitionFiltering
- Enables partition filtering. This parameter is required.- Returns:
this
- See Also:
-
parameters
(experimental) The key/value pairs define properties associated with the table.The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
Default: - The parameter is not defined
- Parameters:
parameters
- The key/value pairs define properties associated with the table. This parameter is required.- Returns:
this
- See Also:
-
partitionIndexes
@Stability(Experimental) public ExternalTable.Builder partitionIndexes(List<? extends PartitionIndex> partitionIndexes) (experimental) Partition indexes on the table.A maximum of 3 indexes are allowed on a table. Keys in the index must be part of the table's partition keys.
Default: table has no partition indexes
- Parameters:
partitionIndexes
- Partition indexes on the table. This parameter is required.- Returns:
this
-
partitionKeys
@Stability(Experimental) public ExternalTable.Builder partitionKeys(List<? extends Column> partitionKeys) (experimental) Partition columns of the table.Default: table is not partitioned
- Parameters:
partitionKeys
- Partition columns of the table. This parameter is required.- Returns:
this
-
storageParameters
@Stability(Experimental) public ExternalTable.Builder storageParameters(List<? extends StorageParameter> storageParameters) (experimental) The user-supplied properties for the description of the physical storage of this table.These properties help describe the format of the data that is stored within the crawled data sources.
The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
Some keys will be auto-populated by glue crawlers, however, you can override them by specifying the key and value in this property.
Default: - The parameter is not defined
Example:
IDatabase glueDatabase; Table table = Table.Builder.create(this, "Table") .storageParameters(List.of(StorageParameter.skipHeaderLineCount(1), StorageParameter.compressionType(CompressionType.GZIP), StorageParameter.custom("foo", "bar"), StorageParameter.custom("separatorChar", ","), StorageParameter.custom(StorageParameters.WRITE_PARALLEL, "off"))) // ... .database(glueDatabase) .columns(List.of(Column.builder() .name("col1") .type(Schema.STRING) .build())) .dataFormat(DataFormat.CSV) .build();
- Parameters:
storageParameters
- The user-supplied properties for the description of the physical storage of this table. This parameter is required.- Returns:
this
- See Also:
-
storedAsSubDirectories
@Stability(Experimental) public ExternalTable.Builder storedAsSubDirectories(Boolean storedAsSubDirectories) (experimental) Indicates whether the table data is stored in subdirectories.Default: false
- Parameters:
storedAsSubDirectories
- Indicates whether the table data is stored in subdirectories. This parameter is required.- Returns:
this
-
tableName
(experimental) Name of the table.Default: - generated by CDK.
- Parameters:
tableName
- Name of the table. This parameter is required.- Returns:
this
-
connection
(experimental) The connection the table will use when performing reads and writes.Default: - No connection
- Parameters:
connection
- The connection the table will use when performing reads and writes. This parameter is required.- Returns:
this
-
externalDataLocation
@Stability(Experimental) public ExternalTable.Builder externalDataLocation(String externalDataLocation) (experimental) The data source location of the glue table, (e.g.default_db_public_example
for Redshift).If this property is set, it will override both
bucket
ands3Prefix
.Default: - No outsourced data source location
- Parameters:
externalDataLocation
- The data source location of the glue table, (e.g.default_db_public_example
for Redshift). This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ExternalTable>
- Returns:
- a newly built instance of
ExternalTable
.
-