Table
Source:
src/AWS/Keyspaces/Table.ts
An Amazon Keyspaces (for Apache Cassandra) table.
Tables are serverless and provisioned asynchronously (CREATING ->
ACTIVE), usually within a minute; the provider waits for ACTIVE
(bounded) before returning. Schema mutations (adding columns, changing
capacity/TTL/PITR) are applied in place; changing keys replaces the table.
Creating a Table
Section titled “Creating a Table”Simple Key-Value Table
const table = yield* Table("Sessions", { keyspaceName: keyspace.keyspaceName, columns: [ { name: "id", type: "uuid" }, { name: "data", type: "text" }, ], partitionKeys: ["id"],});Table with a Clustering Key and TTL
const table = yield* Table("Events", { keyspaceName: keyspace.keyspaceName, columns: [ { name: "device", type: "text" }, { name: "ts", type: "timestamp" }, { name: "payload", type: "blob" }, ], partitionKeys: ["device"], clusteringKeys: [{ name: "ts", orderBy: "DESC" }], ttlEnabled: true, defaultTimeToLive: "1 day",});Change Data Capture
Section titled “Change Data Capture”const table = yield* Table("Orders", { keyspaceName: keyspace.keyspaceName, columns: [ { name: "id", type: "uuid" }, { name: "total", type: "int" }, ], partitionKeys: ["id"], cdcSpecification: { status: "ENABLED", viewType: "NEW_AND_OLD_IMAGES", },});// table.latestStreamArn → consume via the TableStreams binding