interface TableAttributes
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Redshift.TableAttributes |
Java | software.amazon.awscdk.services.redshift.TableAttributes |
Python | aws_cdk.aws_redshift.TableAttributes |
TypeScript (source) | @aws-cdk/aws-redshift » TableAttributes |
A full specification of a Redshift table that can be used to import it fluently into the CDK application.
Example
const databaseName = 'databaseName';
const username = 'myuser'
const tableName = 'mytable'
const user = User.fromUserAttributes(this, 'User', {
username: username,
password: SecretValue.unsafePlainText('NOT_FOR_PRODUCTION'),
cluster: cluster,
databaseName: databaseName,
});
const table = Table.fromTableAttributes(this, 'Table', {
tableName: tableName,
tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],
cluster: cluster,
databaseName: 'databaseName',
});
table.grant(user, TableAction.INSERT);
Properties
Name | Type | Description |
---|---|---|
cluster | ICluster | The cluster where the table is located. |
database | string | The name of the database where the table is located. |
table | Column [] | The columns of the table. |
table | string | Name of the table. |
cluster
Type:
ICluster
The cluster where the table is located.
databaseName
Type:
string
The name of the database where the table is located.
tableColumns
Type:
Column
[]
The columns of the table.
tableName
Type:
string
Name of the table.