Coder Social home page Coder Social logo

alagbe003 / zetasql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/zetasql

0.0 0.0 0.0 25.14 MB

ZetaSQL - Analyzer Framework for SQL

License: Apache License 2.0

C++ 87.56% Python 2.71% C 0.03% Java 6.10% Yacc 1.48% Lex 0.20% Dockerfile 0.01% Starlark 1.91%

zetasql's Introduction

ZetaSQL - Analyzer Framework for SQL

ZetaSQL defines a language (grammar, types, data model, and semantics) as well as a parser and analyzer. It is not itself a database or query engine. Instead it is intended to be used by multiple engines wanting to provide consistent behavior for all semantic analysis, name resolution, type checking, implicit casting, etc. Specific query engines may not implement all features in the ZetaSQL language and may give errors if specific features are not supported. For example, engine A may not support any updates and engine B may not support analytic functions.

ZetaSQL Language Guide

ZetaSQL ResolvedAST API

ZetaSQL BigQuery Analysis Example

Status of Project and Roadmap

This codebase is being open sourced in multiple phases:

  1. Parser and Analyzer Complete
  2. Reference Implementation In Progress
    • Base capability Complete
    • Function library In Progress
  3. Compliance Tests Complete
    • includes framework for validating compliance of arbitrary engines
  4. Misc tooling
    • Improved Formatter Complete

Multiplatform support is planned for the following platforms:

  • Linux (Ubuntu 20.04 is our reference platform, but others may work).
    • gcc-9+ is required, recent versions of clang may work.
  • MacOS (Experimental)
  • Windows (version TDB)

We do not provide any guarantees of API stability and cannot accept contributions.

Flags

ZetaSQL uses the Abseil Flags library to handle commandline flags. Unless otherwise documented, all flags are for debugging purposes only and may change, stop working or be removed at any time.

How to Build

ZetaSQL uses bazel for building and dependency resolution. After installing bazel (check .bazelversion for the specific version of bazel we test with, but other versions may work), simply run:

bazel build ...

If your Mac build fails due the python error ModuleNotFoundError: no module named 'google.protobuf', run pip install protobuf==<version> to install python protobuf first. The protobuf version can be found in the zetasql_deps_step_2.bzl file.

How to add as a Dependency in bazel

See the (WORKSPACE) file, as it is a little unusual.

With docker

TODO: Add docker build instructions.

Example Usage

A very basic command line tool is available to run simple queries with the reference implementation: bazel run //zetasql/tools/execute_query:execute_query -- "select 1 + 1;"

The reference implementation is not yet completely released and currently supports only a subset of functions and types.

Differential Privacy

For questions, documentation and examples of ZetaSQLs implementation of Differential Privacy, please check out (https://github.com/google/differential-privacy).

Versions

ZetaSQL makes no guarantees regarding compatibility between releases. Breaking changes may be made at any time. Our releases are numbered based on the date of the commit the release is cut from. The number format is YYYY.MM.n, where YYYY is the year, MM is the two digit month, and n is a sequence number within the time period.

License

Apache License 2.0

Support Disclaimer

This is not an officially supported Google product.

zetasql's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.