Skip to content

CreatePartition

Source: src/AWS/Glue/CreatePartition.ts

Runtime binding for glue:CreatePartition.

Registers a new partition on the bound Table — the write half of the classic “data landed in S3, register the partition so Athena sees it” pipeline. Fails with the typed AlreadyExistsException if the partition is already registered. The database/table names and catalog id are injected from the binding. Provide the implementation with Effect.provide(AWS.Glue.CreatePartitionHttp).

// init
const createPartition = yield* AWS.Glue.CreatePartition(table);
// runtime — idempotent registration
yield* createPartition({
PartitionInput: {
Values: ["2026-01-01"],
StorageDescriptor: { Location: "s3://my-data-lake/events/dt=2026-01-01/" },
},
}).pipe(Effect.catchTag("AlreadyExistsException", () => Effect.void));