Class ExternalTableProps.Builder
java.lang.Object
software.amazon.awscdk.services.glue.alpha.ExternalTableProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExternalTableProps>
- Enclosing interface:
ExternalTableProps
@Stability(Experimental)
public static final class ExternalTableProps.Builder
extends Object
implements software.amazon.jsii.Builder<ExternalTableProps>
A builder for
ExternalTableProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofTableBaseProps.getColumns()
compressed
(Boolean compressed) Sets the value ofTableBaseProps.getCompressed()
connection
(IConnection connection) Sets the value ofExternalTableProps.getConnection()
Sets the value ofTableBaseProps.getDatabase()
dataFormat
(DataFormat dataFormat) Sets the value ofTableBaseProps.getDataFormat()
description
(String description) Sets the value ofTableBaseProps.getDescription()
enablePartitionFiltering
(Boolean enablePartitionFiltering) Sets the value ofTableBaseProps.getEnablePartitionFiltering()
externalDataLocation
(String externalDataLocation) Sets the value ofExternalTableProps.getExternalDataLocation()
parameters
(Map<String, String> parameters) Sets the value ofTableBaseProps.getParameters()
partitionIndexes
(List<? extends PartitionIndex> partitionIndexes) Sets the value ofTableBaseProps.getPartitionIndexes()
partitionKeys
(List<? extends Column> partitionKeys) Sets the value ofTableBaseProps.getPartitionKeys()
storageParameters
(List<? extends StorageParameter> storageParameters) Sets the value ofTableBaseProps.getStorageParameters()
storedAsSubDirectories
(Boolean storedAsSubDirectories) Sets the value ofTableBaseProps.getStoredAsSubDirectories()
Sets the value ofTableBaseProps.getTableName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
connection
Sets the value ofExternalTableProps.getConnection()
- Parameters:
connection
- The connection the table will use when performing reads and writes. This parameter is required.- Returns:
this
-
externalDataLocation
@Stability(Experimental) public ExternalTableProps.Builder externalDataLocation(String externalDataLocation) Sets the value ofExternalTableProps.getExternalDataLocation()
- Parameters:
externalDataLocation
- The data source location of the glue table, (e.g.default_db_public_example
for Redshift). This parameter is required. If this property is set, it will override bothbucket
ands3Prefix
.- Returns:
this
-
columns
Sets the value ofTableBaseProps.getColumns()
- Parameters:
columns
- Columns of the table. This parameter is required.- Returns:
this
-
database
Sets the value ofTableBaseProps.getDatabase()
- Parameters:
database
- Database in which to store the table. This parameter is required.- Returns:
this
-
dataFormat
Sets the value ofTableBaseProps.getDataFormat()
- Parameters:
dataFormat
- Storage type of the table's data. This parameter is required.- Returns:
this
-
compressed
Sets the value ofTableBaseProps.getCompressed()
- Parameters:
compressed
- Indicates whether the table's data is compressed or not.- Returns:
this
-
description
Sets the value ofTableBaseProps.getDescription()
- Parameters:
description
- Description of the table.- Returns:
this
-
enablePartitionFiltering
@Stability(Experimental) public ExternalTableProps.Builder enablePartitionFiltering(Boolean enablePartitionFiltering) Sets the value ofTableBaseProps.getEnablePartitionFiltering()
- Parameters:
enablePartitionFiltering
- Enables partition filtering.- Returns:
this
-
parameters
@Stability(Experimental) public ExternalTableProps.Builder parameters(Map<String, String> parameters) Sets the value ofTableBaseProps.getParameters()
- Parameters:
parameters
- 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.- Returns:
this
-
partitionIndexes
@Stability(Experimental) public ExternalTableProps.Builder partitionIndexes(List<? extends PartitionIndex> partitionIndexes) Sets the value ofTableBaseProps.getPartitionIndexes()
- Parameters:
partitionIndexes
- 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.- Returns:
this
-
partitionKeys
@Stability(Experimental) public ExternalTableProps.Builder partitionKeys(List<? extends Column> partitionKeys) Sets the value ofTableBaseProps.getPartitionKeys()
- Parameters:
partitionKeys
- Partition columns of the table.- Returns:
this
-
storageParameters
@Stability(Experimental) public ExternalTableProps.Builder storageParameters(List<? extends StorageParameter> storageParameters) Sets the value ofTableBaseProps.getStorageParameters()
- Parameters:
storageParameters
- 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.
- Returns:
this
-
storedAsSubDirectories
@Stability(Experimental) public ExternalTableProps.Builder storedAsSubDirectories(Boolean storedAsSubDirectories) Sets the value ofTableBaseProps.getStoredAsSubDirectories()
- Parameters:
storedAsSubDirectories
- Indicates whether the table data is stored in subdirectories.- Returns:
this
-
tableName
Sets the value ofTableBaseProps.getTableName()
- Parameters:
tableName
- Name of the table.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ExternalTableProps>
- Returns:
- a new instance of
ExternalTableProps
- Throws:
NullPointerException
- if any required attribute was not provided
-