Athena Partition Projection Calculator - Partition Count and Path Preview Tool
First Published:
Last Updated:
All calculations are performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your partition configuration never leaves your device.
- This tool is provided "AS IS" without any warranties of any kind.
- The author accepts no responsibility for partition planning decisions made based on this tool's output.
- This tool does not connect to AWS Athena, Glue, or S3. Partition counts are computed from the projection configuration only.
- Always validate the generated Glue Table parameters with
aws glue get-tableorMSCK REPAIRequivalents in a non-production environment. - By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Storage Location Template
Use
${column_name} placeholders that match your partition column names.Partition Columns
Features
- Four projection types supported:
integer,enum,date, andinjected, matching AWS Athena's Partition Projection specification. - Cartesian product calculation: Total partitions are computed from the product of per-column cardinalities, with graduated warnings at 1,000 / 10,000 / 1,000,000 thresholds.
- Sample path preview: Expands
storage.location.templatewith the first 5 and last 5 partitions (or all partitions if ≤ 10 total). - Glue Table / CloudFormation export: Generates
projection.*parameters in both YAML andAWS::Glue::TableJSON snippet forms. - Three curated presets: date-only, composite key, and an excessive-cartesian demo that trips the error threshold.
How to Use
- Click a Preset button to load an example, or start with the default 3-column date partition layout.
- Edit storage.location.template with your actual S3 prefix. Use
${column_name}placeholders matching each partition column. - Add, remove, or edit partition columns. Switching the column type reveals the relevant fields (range, interval, values, or format).
- Review the total partition count, the badge (Small / Moderate / Large / Excessive), and the sample paths to confirm the layout is sensible.
- Use Copy Glue YAML or Copy CloudFormation JSON to paste the configuration into your infrastructure code.
Important Notes
- Date format tokens:
yyyy/MM/dd/HH/mm/ssare supported. All date arithmetic is performed in UTC. - Date range input: Accept
yyyy-MM-ddoryyyy-MM-dd HH:mm:ss. The range end is inclusive. - Date expansion cap: Per-column date enumeration is capped at 10,000 steps for performance; larger ranges will show a truncation notice but still contribute their full cardinality to the cartesian product.
- Sample paths: When the total is ≤ 100, all partitions are enumerated. Otherwise only the first 5 and last 5 are shown as heuristic samples.
- Injected columns: These are supplied at query time (e.g.
WHERE col = '...') and do not expand to a fixed value set. They contribute 0 to the projection expansion but are still declared in the Glue Table. - Partition count discipline: AWS recommends keeping the projected partition count small enough that query planning completes quickly. Use the badge as a quick guide rather than a hard rule.
References:
Tech Blog with curated related content
Web Tools Collection
Written by Hidekazu Konishi