class TableBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Glue.Alpha.TableBase |
![]() | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#TableBase |
![]() | software.amazon.awscdk.services.glue.alpha.TableBase |
![]() | aws_cdk.aws_glue_alpha.TableBase |
![]() | @aws-cdk/aws-glue-alpha ยป TableBase |
Implements
IConstruct
, IDependable
, IResource
, 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
Table
Base 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. |
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. |
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 by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
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.
storageParameters?
Type:
Storage
[]
(optional)
The tables' storage descriptor properties.
Methods
Name | Description |
---|---|
add | Add a partition index to the table. |
apply | Apply the given removal policy to this resource. |
grant(grantee, actions) | Grant the given identity custom permissions. |
grant | |
grant | |
grant | Grant the given identity custom permissions to ALL underlying resources of the table. |
grant | |
to | Returns a string representation of this construct. |
static from | |
static from | Creates a Table construct that represents an external table. |
addPartitionIndex(index)
public addPartitionIndex(index: PartitionIndex): void
Parameters
- index
Partition
Index
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
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
- actions
string[]
Returns
Grant the given identity custom permissions.
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
- actions
string[]
Returns
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.
grantWrite(grantee)
public grantWrite(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
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.