TableAttributes

class aws_cdk.aws_redshift.TableAttributes(*, cluster, database_name, table_columns, table_name)

Bases: object

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

Parameters:
  • cluster (ICluster) – (experimental) The cluster where the table is located.

  • database_name (str) – (experimental) The name of the database where the table is located.

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

  • table_name (str) – (experimental) Name of the table.

Stability:

experimental

ExampleMetadata:

fixture=cluster infused

Example:

database_name = "databaseName"
username = "myuser"
table_name = "mytable"

user = User.from_user_attributes(self, "User",
    username=username,
    password=SecretValue.unsafe_plain_text("NOT_FOR_PRODUCTION"),
    cluster=cluster,
    database_name=database_name
)
table = Table.from_table_attributes(self, "Table",
    table_name=table_name,
    table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
    cluster=cluster,
    database_name="databaseName"
)
table.grant(user, TableAction.INSERT)

Attributes

cluster

(experimental) The cluster where the table is located.

Stability:

experimental

database_name

(experimental) The name of the database where the table is located.

Stability:

experimental

table_columns

(experimental) The columns of the table.

Stability:

experimental

table_name

(experimental) Name of the table.

Stability:

experimental