Athena partition projection generator

Configure enum, integer, date or injected partition columns — get ready CREATE TABLE and ALTER TABLE SQL.

CREATE TABLE

CREATE EXTERNAL TABLE `events` (
  `id` string
)
PARTITIONED BY (`year` string)
LOCATION 's3://my-bucket/events/'
TBLPROPERTIES (
  'projection.enabled'='true',
  'projection.year.type'='date',
  'projection.year.range'='2015-01,NOW',
  'projection.year.format'='yyyy-MM',
  'projection.year.interval'='1',
  'projection.year.interval.unit'='MONTHS'
);

ALTER TABLE (existing table)

ALTER TABLE `events` SET TBLPROPERTIES (
  'projection.enabled'='true',
  'projection.year.type'='date',
  'projection.year.range'='2015-01,NOW',
  'projection.year.format'='yyyy-MM',
  'projection.year.interval'='1',
  'projection.year.interval.unit'='MONTHS'
);

Runs in your browser. Nothing you type is sent anywhere.

How this works

Do this against your live database in Tablyne.

Amazon Athena Client →

FAQ

Do I need storage.location.template? +

Only if your S3 paths don't follow the standard .../column=value/... layout. If they do, skip it — Athena derives the location from the partition values automatically.

Can I mix projection types in one table? +

Yes — a table can combine enum, integer, date and injected columns in any combination.

What happens if I enable projection but miss a column's configuration? +

Athena fails with a metastore error naming the missing column — every partition column needs at least its .type property once projection.enabled is true.