Class Table
(experimental) A Glue table.
Inherited Members
Namespace: Amazon.CDK.AWS.Glue
Assembly: Amazon.CDK.AWS.Glue.dll
Syntax (csharp)
public class Table : Resource, ITable, IResource, IConstruct, IDependable
Syntax (vb)
Public Class Table
Inherits Resource
Implements ITable, IResource, IConstruct, IDependable
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
Database myDatabase;
new Table(this, "MyTable", new TableProps {
Database = myDatabase,
TableName = "my_table",
Columns = new [] { new Column {
Name = "col1",
Type = Schema.STRING
} },
PartitionKeys = new [] { new Column {
Name = "year",
Type = Schema.SMALL_INT
}, new Column {
Name = "month",
Type = Schema.SMALL_INT
} },
DataFormat = DataFormat.JSON
});
Synopsis
Constructors
Table(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Table(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Table(Construct, String, ITableProps) |
Properties
Bucket | (experimental) S3 bucket in which the table's data resides. |
Columns | (experimental) This table's columns. |
Compressed | (experimental) Indicates whether the table's data is compressed or not. |
Database | (experimental) Database this table belongs to. |
DataFormat | (experimental) Format of this table's data files. |
Encryption | (experimental) The type of encryption enabled for the table. |
EncryptionKey | (experimental) The KMS key used to secure the data if |
PartitionIndexes | (experimental) This table's partition indexes. |
PartitionKeys | (experimental) This table's partition keys if the table is partitioned. |
S3Prefix | (experimental) S3 Key Prefix under which this table's files are stored in S3. |
TableArn | (experimental) ARN of this table. |
TableName | (experimental) Name of this table. |
Methods
AddPartitionIndex(IPartitionIndex) | (experimental) Add a partition index to the table. |
FromTableArn(Construct, String, String) | |
FromTableAttributes(Construct, String, ITableAttributes) | (experimental) Creates a Table construct that represents an external table. |
Grant(IGrantable, String[]) | (experimental) Grant the given identity custom permissions. |
GrantRead(IGrantable) | (experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal. |
GrantReadWrite(IGrantable) | (experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal. |
GrantToUnderlyingResources(IGrantable, String[]) | (experimental) Grant the given identity custom permissions to ALL underlying resources of the table. |
GrantWrite(IGrantable) | (experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal. |
Constructors
Table(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Table(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Table(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Table(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Table(Construct, String, ITableProps)
public Table(Construct scope, string id, ITableProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ITableProps
Remarks
Stability: Experimental
Properties
Bucket
(experimental) S3 bucket in which the table's data resides.
public virtual IBucket Bucket { get; }
Property Value
Remarks
Stability: Experimental
Columns
(experimental) This table's columns.
public virtual IColumn[] Columns { get; }
Property Value
IColumn[]
Remarks
Stability: Experimental
Compressed
(experimental) Indicates whether the table's data is compressed or not.
public virtual bool Compressed { get; }
Property Value
System.Boolean
Remarks
Stability: Experimental
Database
(experimental) Database this table belongs to.
public virtual IDatabase Database { get; }
Property Value
Remarks
Stability: Experimental
DataFormat
(experimental) Format of this table's data files.
public virtual DataFormat DataFormat { get; }
Property Value
Remarks
Stability: Experimental
Encryption
(experimental) The type of encryption enabled for the table.
public virtual TableEncryption Encryption { get; }
Property Value
Remarks
Stability: Experimental
EncryptionKey
(experimental) The KMS key used to secure the data if encryption
is set to CSE-KMS
or SSE-KMS
.
public virtual IKey EncryptionKey { get; }
Property Value
Remarks
Otherwise, undefined
.
Stability: Experimental
PartitionIndexes
(experimental) This table's partition indexes.
public virtual IPartitionIndex[] PartitionIndexes { get; }
Property Value
Remarks
Stability: Experimental
PartitionKeys
(experimental) This table's partition keys if the table is partitioned.
public virtual IColumn[] PartitionKeys { get; }
Property Value
IColumn[]
Remarks
Stability: Experimental
S3Prefix
(experimental) S3 Key Prefix under which this table's files are stored in S3.
public virtual string S3Prefix { get; }
Property Value
System.String
Remarks
Stability: Experimental
TableArn
(experimental) ARN of this table.
public virtual string TableArn { get; }
Property Value
System.String
Remarks
Stability: Experimental
TableName
(experimental) Name of this table.
public virtual string TableName { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
AddPartitionIndex(IPartitionIndex)
(experimental) Add a partition index to the table.
public virtual void AddPartitionIndex(IPartitionIndex index)
Parameters
- index IPartitionIndex
Remarks
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.
Stability: Experimental
See: https://docs.aws.amazon.com/glue/latest/dg/partition-indexes.html
FromTableArn(Construct, String, String)
public static ITable FromTableArn(Construct scope, string id, string tableArn)
Parameters
- scope Constructs.Construct
- id System.String
- tableArn System.String
Returns
Remarks
Stability: Experimental
FromTableAttributes(Construct, String, ITableAttributes)
(experimental) Creates a Table construct that represents an external table.
public static ITable FromTableAttributes(Construct scope, string id, ITableAttributes attrs)
Parameters
- scope Constructs.Construct
The scope creating construct (usually
this
).- id System.String
The construct's id.
- attrs ITableAttributes
Import attributes.
Returns
Remarks
Stability: Experimental
Grant(IGrantable, String[])
(experimental) Grant the given identity custom permissions.
public virtual Grant Grant(IGrantable grantee, string[] actions)
Parameters
- grantee IGrantable
- actions System.String[]
Returns
Remarks
Stability: Experimental
GrantRead(IGrantable)
(experimental) Grant read permissions to the table and the underlying data stored in S3 to an IAM principal.
public virtual Grant GrantRead(IGrantable grantee)
Parameters
- grantee IGrantable
the principal.
Returns
Remarks
Stability: Experimental
GrantReadWrite(IGrantable)
(experimental) Grant read and write permissions to the table and the underlying data stored in S3 to an IAM principal.
public virtual Grant GrantReadWrite(IGrantable grantee)
Parameters
- grantee IGrantable
the principal.
Returns
Remarks
Stability: Experimental
GrantToUnderlyingResources(IGrantable, String[])
(experimental) Grant the given identity custom permissions to ALL underlying resources of the table.
public virtual Grant GrantToUnderlyingResources(IGrantable grantee, string[] actions)
Parameters
- grantee IGrantable
- actions System.String[]
Returns
Remarks
Permissions will be granted to the catalog, the database, and the table.
Stability: Experimental
GrantWrite(IGrantable)
(experimental) Grant write permissions to the table and the underlying data stored in S3 to an IAM principal.
public virtual Grant GrantWrite(IGrantable grantee)
Parameters
- grantee IGrantable
the principal.
Returns
Remarks
Stability: Experimental