@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:31.579Z") @Stability(value=Experimental) public class Table extends Resource implements ITable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
Table.Builder
(experimental) A fluent builder for
Table. |
software.amazon.jsii.JsiiObject.InitializationModeITable.Jsii$Default, ITable.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Table(software.constructs.Construct scope,
String id,
TableProps props) |
protected |
Table(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Table(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPartitionIndex(PartitionIndex index)
(experimental) Add a partition index to the table.
|
static ITable |
fromTableArn(software.constructs.Construct scope,
String id,
String tableArn) |
static ITable |
fromTableAttributes(software.constructs.Construct scope,
String id,
TableAttributes attrs)
(experimental) Creates a Table construct that represents an external table.
|
IBucket |
getBucket()
(experimental) S3 bucket in which the table's data resides.
|
List<Column> |
getColumns()
(experimental) This table's columns.
|
Boolean |
getCompressed()
(experimental) Indicates whether the table's data is compressed or not.
|
IDatabase |
getDatabase()
(experimental) Database this table belongs to.
|
DataFormat |
getDataFormat()
(experimental) Format of this table's data files.
|
TableEncryption |
getEncryption()
(experimental) The type of encryption enabled for the table.
|
IKey |
getEncryptionKey()
(experimental) The KMS key used to secure the data if `encryption` is set to `CSE-KMS` or `SSE-KMS`.
|
List<PartitionIndex> |
getPartitionIndexes()
(experimental) This table's partition indexes.
|
List<Column> |
getPartitionKeys()
(experimental) This table's partition keys if the table is partitioned.
|
String |
getS3Prefix()
(experimental) S3 Key Prefix under which this table's files are stored in S3.
|
String |
getTableArn()
(experimental) ARN of this table.
|
String |
getTableName()
(experimental) Name of this table.
|
Grant |
grant(IGrantable grantee,
List<String> actions)
(experimental) Grant the given identity custom permissions.
|
Grant |
grantRead(IGrantable grantee)
(experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal.
|
Grant |
grantReadWrite(IGrantable grantee)
(experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal.
|
Grant |
grantToUnderlyingResources(IGrantable grantee,
List<String> actions)
(experimental) Grant the given identity custom permissions to ALL underlying resources of the table.
|
Grant |
grantWrite(IGrantable grantee)
(experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackgetNodeprotected Table(software.amazon.jsii.JsiiObjectRef objRef)
protected Table(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Table(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
TableProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static ITable fromTableArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String tableArn)
scope - This parameter is required.id - This parameter is required.tableArn - This parameter is required.@Stability(value=Experimental) @NotNull public static ITable fromTableAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TableAttributes attrs)
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.@Stability(value=Experimental)
public void addPartitionIndex(@NotNull
PartitionIndex index)
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.
index - This parameter is required.https://docs.aws.amazon.com/glue/latest/dg/partition-indexes.html@Stability(value=Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull List<String> actions)
grantee - This parameter is required.actions - This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
grantee - the principal. This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantReadWrite(@NotNull IGrantable grantee)
grantee - the principal. This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantToUnderlyingResources(@NotNull IGrantable grantee, @NotNull List<String> actions)
Permissions will be granted to the catalog, the database, and the table.
grantee - This parameter is required.actions - This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
grantee - the principal. This parameter is required.@Stability(value=Experimental) @NotNull public IBucket getBucket()
@Stability(value=Experimental) @NotNull public List<Column> getColumns()
@Stability(value=Experimental) @NotNull public Boolean getCompressed()
@Stability(value=Experimental) @NotNull public IDatabase getDatabase()
@Stability(value=Experimental) @NotNull public DataFormat getDataFormat()
@Stability(value=Experimental) @NotNull public TableEncryption getEncryption()
@Stability(value=Experimental) @NotNull public String getS3Prefix()
@Stability(value=Experimental) @NotNull public String getTableArn()
getTableArn in interface ITable@Stability(value=Experimental) @NotNull public String getTableName()
getTableName in interface ITable@Stability(value=Experimental) @Nullable public IKey getEncryptionKey()
Otherwise, undefined.
@Stability(value=Experimental) @Nullable public List<PartitionIndex> getPartitionIndexes()
Copyright © 2022. All rights reserved.