class TableBase
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.TableBase |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#TableBase |
Java | software.amazon.awscdk.services.glue.alpha.TableBase |
Python | aws_cdk.aws_glue_alpha.TableBase |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป TableBase |
Implements
IConstruct, IDependable, IResource, IEnvironment, ITable
Extends
Resource
Implemented by
External, S3, Table
A Glue table.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as glue_alpha from '@aws-cdk/aws-glue-alpha';
const tableBase = glue_alpha.TableBase.fromTableArn(this, 'MyTableBase', 'tableArn');
Initializer
new TableBase(scope: Construct, id: string, props: TableBaseProps)
Parameters
- scope
Construct - id
string - props
TableBase Props
Properties
| Name | Type | Description |
|---|---|---|
| columns | Column[] | This table's columns. |
| compressed | boolean | Indicates whether the table's data is compressed or not. |
| data | Data | Format of this table's data files. |
| database | IDatabase | Database this table belongs to. |
| env | Resource | The environment this resource belongs to. |
| has | boolean | Whether the data stored in the table is encrypted. |
| node | Node | The tree node. |
| parameters | { [string]: string } | The tables' properties associated with the table. |
| stack | Stack | The stack in which this resource is defined. |
| table | string | |
| table | string | |
| table | Cfn | |
| partition | Partition[] | |
| partition | Column[] | This table's partition keys if the table is partitioned. |
| partition | { [string]: Partition } | This table's partition projection configuration if enabled. |
| storage | Storage[] | The tables' storage descriptor properties. |
columns
Type:
Column[]
This table's columns.
compressed
Type:
boolean
Indicates whether the table's data is compressed or not.
dataFormat
Type:
Data
Format of this table's data files.
database
Type:
IDatabase
Database this table belongs to.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
hasEncryptedData
Type:
boolean
Whether the data stored in the table is encrypted.
Emitted as the
has_encrypted_data table parameter.
node
Type:
Node
The tree node.
parameters
Type:
{ [string]: string }
The tables' properties associated with the table.
stack
Type:
Stack
The stack in which this resource is defined.
tableArn
Type:
string
tableName
Type:
string
tableResource
Type:
Cfn
partitionIndexes?
Type:
Partition[]
(optional)
partitionKeys?
Type:
Column[]
(optional)
This table's partition keys if the table is partitioned.
partitionProjection?
Type:
{ [string]: Partition }
(optional)
This table's partition projection configuration if enabled.
storageParameters?
Type:
Storage[]
(optional)
The tables' storage descriptor properties.
Methods
| Name | Description |
|---|---|
| add | Add a partition index to the table. |
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| grant(grantee, actions) | Grant the given identity custom permissions on this table. |
| grant | |
| grant | |
| grant | Grant the given identity custom permissions on this table AND its parent catalog and database. |
| grant | |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | |
| static from | Creates a Table construct that represents an external table. |
addPartitionIndex(index)
public addPartitionIndex(index: PartitionIndex): void
Parameters
- index
PartitionIndex
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.
See also: https://docs.aws.amazon.com/glue/latest/dg/partition-indexes.html
applyCrossStackReferenceStrength(strength)
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
Parameters
- strength
Referenceโ - The reference strength to use for this resource.Strength
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
grant(grantee, actions)
public grant(grantee: IGrantable, actions: string[]): Grant
Parameters
- grantee
IGrantableโ the principal. - actions
string[]โ the set of Glue actions to allow (for exampleglue:GetTable).
Returns
Grant the given identity custom permissions on this table.
This is a low-level escape hatch: the actions are applied verbatim,
scoped to this table's ARN. Prefer the intent-based grantRead /
grantWrite / grantReadWrite methods, which grant a curated set of
actions and also cover the underlying S3 data. Only pass the specific
actions the grantee needs - avoid service wildcards such as glue:*.
[disable-awslint:no-grants]
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
grantReadWrite(grantee)
public grantReadWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
grantToUnderlyingResources(grantee, actions)
public grantToUnderlyingResources(grantee: IGrantable, actions: string[]): Grant
Parameters
- grantee
IGrantableโ the principal. - actions
string[]โ the set of Glue actions to allow (for exampleglue:GetTable).
Returns
Grant the given identity custom permissions on this table AND its parent catalog and database.
This is a low-level escape hatch for actions (such as certain Lake
Formation or crawler operations) that must be authorized against the
catalog and database in addition to the table. The actions are applied
verbatim to all three ARNs (table, catalog, database), so scope them
tightly: pass only the specific actions the grantee needs and avoid
service wildcards such as glue:*, which would grant broad access across
every resource in the catalog and database.
[disable-awslint:no-grants]
grantWrite(grantee)
public grantWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
static fromTableArn(scope, id, tableArn)
public static fromTableArn(scope: Construct, id: string, tableArn: string): ITable
Parameters
- scope
Construct - id
string - tableArn
string
Returns
static fromTableAttributes(scope, id, attrs)
public static fromTableAttributes(scope: Construct, id: string, attrs: TableAttributes): ITable
Parameters
- scope
Constructโ The scope creating construct (usuallythis). - id
stringโ The construct's id. - attrs
Tableโ Import attributes.Attributes
Returns
Creates a Table construct that represents an external table.

.NET
Go
Java
Python
TypeScript (