Class S3TableProps.Builder

java.lang.Object
software.amazon.awscdk.services.glue.alpha.S3TableProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<S3TableProps>
Enclosing interface:
S3TableProps

@Stability(Experimental) public static final class S3TableProps.Builder extends Object implements software.amazon.jsii.Builder<S3TableProps>
A builder for S3TableProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • bucket

      @Stability(Experimental) public S3TableProps.Builder bucket(IBucket bucket)
      Sets the value of S3TableProps.getBucket()
      Parameters:
      bucket - S3 bucket in which to store data.
      Returns:
      this
    • encryption

      @Stability(Experimental) public S3TableProps.Builder encryption(TableEncryption encryption)
      Parameters:
      encryption - The kind of encryption to secure the data with. You can only provide this option if you are not explicitly passing in a bucket.

      If you choose SSE-KMS, you can provide an un-managed KMS key with encryptionKey. If you choose CSE-KMS, you may provide an un-managed KMS key with encryptionKey; one is created automatically if omitted.

      Returns:
      this
    • encryptionKey

      @Stability(Experimental) public S3TableProps.Builder encryptionKey(IKey encryptionKey)
      Parameters:
      encryptionKey - External KMS key to use for bucket encryption. The encryption property must be SSE-KMS or CSE-KMS.
      Returns:
      this
    • s3Prefix

      @Stability(Experimental) public S3TableProps.Builder s3Prefix(String s3Prefix)
      Sets the value of S3TableProps.getS3Prefix()
      Parameters:
      s3Prefix - S3 prefix under which table objects are stored. When the table shares a bucket with other tables or consumers, set this so that the grant* methods scope S3 access to this table's data. Without a prefix, those grants cover the entire bucket.
      Returns:
      this
    • columns

      @Stability(Experimental) public S3TableProps.Builder columns(List<? extends Column> columns)
      Sets the value of TableBaseProps.getColumns()
      Parameters:
      columns - Columns of the table. This parameter is required.
      Returns:
      this
    • database

      @Stability(Experimental) public S3TableProps.Builder database(IDatabase database)
      Parameters:
      database - Database in which to store the table. This parameter is required.
      Returns:
      this
    • dataFormat

      @Stability(Experimental) public S3TableProps.Builder dataFormat(DataFormat dataFormat)
      Parameters:
      dataFormat - Storage type of the table's data. This parameter is required.
      Returns:
      this
    • compressed

      @Stability(Experimental) public S3TableProps.Builder compressed(Boolean compressed)
      Parameters:
      compressed - Indicates whether the table's data is compressed or not.
      Returns:
      this
    • description

      @Stability(Experimental) public S3TableProps.Builder description(String description)
      Parameters:
      description - Description of the table.
      Returns:
      this
    • enablePartitionFiltering

      @Stability(Experimental) public S3TableProps.Builder enablePartitionFiltering(Boolean enablePartitionFiltering)
      Parameters:
      enablePartitionFiltering - Enables partition filtering.
      Returns:
      this
    • hasEncryptedData

      @Stability(Experimental) public S3TableProps.Builder hasEncryptedData(Boolean hasEncryptedData)
      Parameters:
      hasEncryptedData - Whether the data stored in the table is encrypted. This sets the has_encrypted_data table parameter. Athena reads it when querying client-side (CSE-KMS) encrypted datasets; for server-side encrypted (SSE-S3 / SSE-KMS) or unencrypted data it has no effect, since Amazon S3 decrypts server-side encrypted objects transparently.

      Do not also set has_encrypted_data through parameters - use this property instead. A conflicting value in parameters is rejected.

      Returns:
      this
    • parameters

      @Stability(Experimental) public S3TableProps.Builder parameters(Map<String,String> parameters)
      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 S3TableProps.Builder partitionIndexes(List<? extends PartitionIndex> partitionIndexes)
      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 S3TableProps.Builder partitionKeys(List<? extends Column> partitionKeys)
      Parameters:
      partitionKeys - Partition columns of the table.
      Returns:
      this
    • partitionProjection

      @Stability(Experimental) public S3TableProps.Builder partitionProjection(Map<String,? extends PartitionProjectionConfiguration> partitionProjection)
      Parameters:
      partitionProjection - Partition projection configuration for this table. Partition projection allows Athena to automatically add new partitions without requiring ALTER TABLE ADD PARTITION statements.
      Returns:
      this
    • storageParameters

      @Stability(Experimental) public S3TableProps.Builder storageParameters(List<? extends StorageParameter> storageParameters)
      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 S3TableProps.Builder storedAsSubDirectories(Boolean storedAsSubDirectories)
      Parameters:
      storedAsSubDirectories - Indicates whether the table data is stored in subdirectories.
      Returns:
      this
    • tableName

      @Stability(Experimental) public S3TableProps.Builder tableName(String tableName)
      Parameters:
      tableName - Name of the table.
      Returns:
      this
    • build

      @Stability(Experimental) public S3TableProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<S3TableProps>
      Returns:
      a new instance of S3TableProps
      Throws:
      NullPointerException - if any required attribute was not provided