Skip to content

Dremio SQL(select) parser written with jison. Parse SQL into abstract syntax tree(AST) and stringify back to SQL. SQL grammar follows https://docs.dremio.com/sql-reference/

License

Notifications You must be signed in to change notification settings

mlilius/js-dremio-sql-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-dremio-sql-parser

parse / stringify sql (select grammar) in js.

Build Status NPM Version NPM Downloads

sql grammar follows https://docs.dremio.com/sql-reference/

news

for more changes see CHANGELOG

commonjs usage

npm install --save js-dremio-sql-parser

const parser = require('js-dremio-sql-parser');
const ast = parser.parse('SELECT * FROM Samples."samples.dremio.com"."zips.json"');

console.log(JSON.stringify(ast, null, 2));

ast.value.selectItems.value[0].value = 'foo';
ast.value.from.value[0].value.value.value = 'bar';

console.log(parser.stringify(ast));
// SELECT foo FROM bar

Build

  • Run npm run build to build the distributable.

LICENSE

MIT

About

Dremio SQL(select) parser written with jison. Parse SQL into abstract syntax tree(AST) and stringify back to SQL. SQL grammar follows https://docs.dremio.com/sql-reference/

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published