Skip to content
v2.273.0

Experimental

@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

TableAttributes Struct ​

A full specification of a Redshift table that can be used to import it fluently into the CDK application.

Example ​

ts
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 ​

clusterIClusterclusterIClusterclusterIClusterClusterIClusterClusterIClusterrequired#
The cluster where the table is located.
databaseNamestringdatabase_namestrdatabaseNameStringDatabaseNamestringDatabaseName*stringrequired#
The name of the database where the table is located.
tableColumnsColumn[]table_columnstyping.List[Column]tableColumnsList<Column>TableColumnsColumn[]TableColumns*[]Columnrequired#
The columns of the table.
tableNamestringtable_namestrtableNameStringTableNamestringTableName*stringrequired#
Name of the table.