Skip to content

Table

Source: src/AWS/S3Tables/Table.ts

A fully-managed Apache Iceberg table within an S3 Tables Namespace.

S3 Tables manages the table’s storage, metadata, and maintenance (compaction, snapshot expiration). Query it through engines like Amazon Athena, Amazon EMR, or Apache Spark via the S3 Tables Iceberg catalog.

import * as S3Tables from "alchemy/AWS/S3Tables";
const bucket = yield* S3Tables.TableBucket("Analytics");
const ns = yield* S3Tables.Namespace("Events", {
tableBucket: bucket.tableBucketArn,
});
const table = yield* S3Tables.Table("PageViews", {
tableBucket: bucket.tableBucketArn,
namespace: ns.namespace,
schema: {
fields: [
{ name: "id", type: "long", required: true },
{ name: "url", type: "string" },
{ name: "ts", type: "timestamp" },
],
},
});