Back to browse
I built an SQL layer for a NoSQL database

I built an SQL layer for a NoSQL database

by cammasmith·May 7, 2026·2 points·0 comments

AI Analysis

●●●BangerBig BrainSolve My ProblemWizardry

Runs real SQL JOINs on DynamoDB by auto-selecting indexes, skipping the usual ETL pipeline.

Strengths
  • Query planner automatically selects partition keys or secondary indexes to minimize scans.
  • Eliminates need for Redshift or Athena pipelines for ad-hoc analytical queries.
  • MCP server integration allows AI assistants to query live DynamoDB data directly.
Weaknesses
  • Client-side JOIN execution could introduce latency for large datasets over network.
  • Beta status means edge cases in complex ANSI SQL translation may still exist.
Category
Target Audience

Backend engineers and data analysts using AWS DynamoDB

Similar To

Amazon PartiQL · Athena · DynamoDB Mapper

Post Description

Of all the NoSQL databases, DynamoDB is one of the most frustrating to query. MongoDB has an expressive query language. Cassandra has CQL, which is close enough to SQL that most engineers can pick it up quickly. DynamoDB gives you key condition expressions, attribute name placeholders for reserved words, and a query model where you have to pick the right index manually for every call. PartiQL exists but doesn't support JOINs, GROUP BY, subqueries, or most of ANSI SQL.

I built DynamoSQL to fix that.

It accepts any ANSI SQL SELECT statement and converts it to the right DynamoDB API calls. The interesting part is the index selection: given an incoming query, the system inspects the available indexes on the table, figures out the most efficient access pattern, and constructs the call. Partition key lookup when possible, secondary index when that fits better, scan only as a last resort.

JOINs were the most involved part. DynamoDB doesn't support them natively, so they execute client-side after fetching from both tables. The full list of supported SQL includes WHERE, all JOIN types, GROUP BY, HAVING, ORDER BY, LIMIT, UNION, INTERSECT, EXCEPT, subqueries, CTEs, and a wide range of aggregate and string functions.

We're looking for beta testers. If you work with DynamoDB and want to run SQL against it, I'd like to hear from you.

https://dynamosql.com/

Similar Projects

SQL Query Optimizer

LLM-augmented SQL optimizer with schema context, but lacks benchmarks proving it beats manual EXPLAIN review.

Solve My ProblemShip It
hura17
103mo ago