Skip to content

nabilseid/athenaSQL

Repository files navigation

athenaSQL

athenaSQL is Athena SQL query builder, inspired by sparkSQL. It borrow some sparkSQL's concept sparkSQL.

It was initially designed to eliminate the need for hard-coding SQL queries as strings within Python scripts and as an alternative to any bespoke SQL query templating. However, it offers the flexibility to be used in various ways as needed.

Quickstart

Installing athenaSQL

$ pip install athenaSQL

Usage

Using athenaSQL is stright forward. First we create a table abstraction class then building a query is just calling chain methods on top of it.

from athenaSQL import Athena

# creating athena table instance from database
table = Athena('database_name').table('table_name')

# creating athena table instance from database
query = table.select()

query.show_query()
SELECT
    *
FROM "database_name"."table_name"

Full documentation Here

Milestone

  • Stable v1 release

    • Add DISTINCT
    • Add LIKE
    • Add partition ADD and DROP
    • Add JOIN operations
    • Add JOIN operations
    • Add UNION operations
    • Add [CREATE, DROP] [DATABASE, TABLE]
    • Add VIEW operations
    • FIX _ prefixed table, view & col names docs
    • FIX reserved keywords doc
    • FIX SerDes in CREATE docs
  • Add BigQuery Adapter

    • TBD