Code Monkey home page Code Monkey logo

zetasql-format-server's Introduction

zetasql-format-server

It is GoogleSQL(BigQuery, Cloud Spanner) dialect format server using ZetaSQL. It runs on Cloud Run(and Knative Serving).

Run on Google Cloud

(Note: It takes very long time. Consider to use Boost mode or build on more powerful machine.)

Usage

$ SERVICE_URL=$(gcloud beta run services describe --format="value(status.domain)" ${REPO_NAME})
$ curl ${SERVICE_URL} --data 'SELECT * FROM tbl'
SELECT
  *
FROM
  tbl

References

zetasql-format-server's People

Contributors

apstndb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zetasql-format-server's Issues

Enclosing IF statement with backticks

For some reason, the formatter is adding backticks around IF statements.

Example:

SELECT IF(x = 1, 1, 0) AS sample
FROM table

turns into

SELECT
  `IF`(x = 1, 1, 0) AS sample
FROM
  table;

ANDROID_HOME

Hi there.

Building the latest version of this repo that uses the June 2020 zetasql fails with:

ERROR: Analysis of target '@com_google_zetasql//zetasql/public:sql_formatter' failed; build aborted: Either the path attribute of android_sdk_repository or the ANDROID_HOME environment variable must be set.

Have you already resolved this?

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.