TableProps

class aws_cdk.aws_redshift.TableProps(*, cluster, database_name, admin_user=None, table_columns, dist_style=None, removal_policy=None, sort_style=None, table_name=None)

Bases: aws_cdk.aws_redshift.DatabaseOptions

(experimental) Properties for configuring a Redshift table.

Parameters
  • cluster (ICluster) – (experimental) The cluster containing the database.

  • database_name (str) – (experimental) The name of the database.

  • admin_user (Optional[ISecret]) – (experimental) The secret containing credentials to a Redshift user with administrator privileges. Secret JSON schema: { username: string; password: string }. Default: - the admin secret is taken from the cluster

  • table_columns (Sequence[Union[Column, Dict[str, Any]]]) – (experimental) The columns of the table.

  • dist_style (Optional[TableDistStyle]) – (experimental) The distribution style of the table. Default: TableDistStyle.AUTO

  • removal_policy (Optional[RemovalPolicy]) – (experimental) The policy to apply when this resource is removed from the application. Default: cdk.RemovalPolicy.Retain

  • sort_style (Optional[TableSortStyle]) – (experimental) The sort style of the table. Default: TableSortStyle.AUTO if no sort key is specified, TableSortStyle.COMPOUND if a sort key is specified

  • table_name (Optional[str]) – (experimental) The name of the table. Default: - a name is generated

Stability

experimental

ExampleMetadata

fixture=cluster infused

Example:

Table(self, "Table",
    table_columns=[Column(name="col1", data_type="varchar(4)", dist_key=True), Column(name="col2", data_type="float")
    ],
    cluster=cluster,
    database_name="databaseName",
    dist_style=TableDistStyle.KEY
)

Attributes

admin_user

(experimental) The secret containing credentials to a Redshift user with administrator privileges.

Secret JSON schema: { username: string; password: string }.

Default
  • the admin secret is taken from the cluster

Stability

experimental

Return type

Optional[ISecret]

cluster

(experimental) The cluster containing the database.

Stability

experimental

Return type

ICluster

database_name

(experimental) The name of the database.

Stability

experimental

Return type

str

dist_style

(experimental) The distribution style of the table.

Default

TableDistStyle.AUTO

Stability

experimental

Return type

Optional[TableDistStyle]

removal_policy

(experimental) The policy to apply when this resource is removed from the application.

Default

cdk.RemovalPolicy.Retain

Stability

experimental

Return type

Optional[RemovalPolicy]

sort_style

(experimental) The sort style of the table.

Default

TableSortStyle.AUTO if no sort key is specified, TableSortStyle.COMPOUND if a sort key is specified

Stability

experimental

Return type

Optional[TableSortStyle]

table_columns

(experimental) The columns of the table.

Stability

experimental

Return type

List[Column]

table_name

(experimental) The name of the table.

Default
  • a name is generated

Stability

experimental

Return type

Optional[str]