java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IResource, ITable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.601Z") @Stability(Experimental) public class Table extends Resource implements ITable
(experimental) A Glue table.

Example:

 Database myDatabase;
 Table.Builder.create(this, "MyTable")
         .database(myDatabase)
         .tableName("my_table")
         .columns(List.of(Column.builder()
                 .name("col1")
                 .type(Schema.STRING)
                 .build()))
         .partitionKeys(List.of(Column.builder()
                 .name("year")
                 .type(Schema.SMALL_INT)
                 .build(), Column.builder()
                 .name("month")
                 .type(Schema.SMALL_INT)
                 .build()))
         .dataFormat(DataFormat.JSON)
         .build();
 
  • Constructor Details

    • Table

      protected Table(software.amazon.jsii.JsiiObjectRef objRef)
    • Table

      protected Table(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Table

      @Stability(Experimental) public Table(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromTableArn

      @Stability(Experimental) @NotNull public static ITable fromTableArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String tableArn)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      tableArn - This parameter is required.
    • fromTableAttributes

      @Stability(Experimental) @NotNull public static ITable fromTableAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableAttributes attrs)
      (experimental) Creates a Table construct that represents an external table.

      Parameters:
      scope - The scope creating construct (usually this). This parameter is required.
      id - The construct's id. This parameter is required.
      attrs - Import attributes. This parameter is required.
    • addPartitionIndex

      @Stability(Experimental) public void addPartitionIndex(@NotNull PartitionIndex index)
      (experimental) Add a partition index to the table.

      You can have a maximum of 3 partition indexes to a table. Partition index keys must be a subset of the table's partition keys.

      Parameters:
      index - This parameter is required.
      See Also:
    • grant

      @Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull List<String> actions)
      (experimental) Grant the given identity custom permissions.

      Parameters:
      grantee - This parameter is required.
      actions - This parameter is required.
    • grantRead

      @Stability(Experimental) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
      (experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal.

      Parameters:
      grantee - the principal. This parameter is required.
    • grantReadWrite

      @Stability(Experimental) @NotNull public Grant grantReadWrite(@NotNull IGrantable grantee)
      (experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal.

      Parameters:
      grantee - the principal. This parameter is required.
    • grantToUnderlyingResources

      @Stability(Experimental) @NotNull public Grant grantToUnderlyingResources(@NotNull IGrantable grantee, @NotNull List<String> actions)
      (experimental) Grant the given identity custom permissions to ALL underlying resources of the table.

      Permissions will be granted to the catalog, the database, and the table.

      Parameters:
      grantee - This parameter is required.
      actions - This parameter is required.
    • grantWrite

      @Stability(Experimental) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
      (experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal.

      Parameters:
      grantee - the principal. This parameter is required.
    • getBucket

      @Stability(Experimental) @NotNull public IBucket getBucket()
      (experimental) S3 bucket in which the table's data resides.
    • getColumns

      @Stability(Experimental) @NotNull public List<Column> getColumns()
      (experimental) This table's columns.
    • getCompressed

      @Stability(Experimental) @NotNull public Boolean getCompressed()
      (experimental) Indicates whether the table's data is compressed or not.
    • getDatabase

      @Stability(Experimental) @NotNull public IDatabase getDatabase()
      (experimental) Database this table belongs to.
    • getDataFormat

      @Stability(Experimental) @NotNull public DataFormat getDataFormat()
      (experimental) Format of this table's data files.
    • getEncryption

      @Stability(Experimental) @NotNull public TableEncryption getEncryption()
      (experimental) The type of encryption enabled for the table.
    • getS3Prefix

      @Stability(Experimental) @NotNull public String getS3Prefix()
      (experimental) S3 Key Prefix under which this table's files are stored in S3.
    • getTableArn

      @Stability(Experimental) @NotNull public String getTableArn()
      (experimental) ARN of this table.
      Specified by:
      getTableArn in interface ITable
    • getTableName

      @Stability(Experimental) @NotNull public String getTableName()
      (experimental) Name of this table.
      Specified by:
      getTableName in interface ITable
    • getEncryptionKey

      @Stability(Experimental) @Nullable public IKey getEncryptionKey()
      (experimental) The KMS key used to secure the data if encryption is set to CSE-KMS or SSE-KMS.

      Otherwise, undefined.

    • getPartitionIndexes

      @Stability(Experimental) @Nullable public List<PartitionIndex> getPartitionIndexes()
      (experimental) This table's partition indexes.
    • getPartitionKeys

      @Stability(Experimental) @Nullable public List<Column> getPartitionKeys()
      (experimental) This table's partition keys if the table is partitioned.