klahnakoski / mo-sql-parsing

Let's make a SQL parser so we can provide a familiar interface to non-sql datastores!
Mozilla Public License 2.0
255 stars 58 forks source link

Support for ENCODE, DISTKEY and SORTKEY in Redshift #245

Closed stevenayers closed 1 month ago

stevenayers commented 1 month ago

Add support for a Redshift DDL statement such as:

CREATE TABLE IF NOT EXISTS web.customers
(
   customer_number INT ENCODE LZO,
   metadata SUPER ENCODE LZO,
   email VARCHAR(255) ENCODE LZO,
   created_at TIMESTAMP ENCODE AZ64,
   last_logged_in_at  TIMESTAMP ENCODE AZ64
)
DISTKEY(customer_number)
SORTKEY(created_at)

raising PR 👍