Giter VIP home page Giter VIP logo

boilingdata-wss-url-signer's Introduction

BoilingData WebSocket URL Signer

Sign BoilingData API WebSocket (wss) URL and use e.g. wscat to send SQL queries over the WebSocket

yarn install
wscat -c `node get-signed-wss-url.js "<username>" "<password>" | jq -r '.signedWsUrl'`
Connected (press CTRL+C to quit)
> {"sql":"SELECT 1;"}
< {"messageType":"DATA","data":[{"1":1}],"batchSerial":1,"totalBatches":1}
> {"sql":"SELECT * FROM parquet_scan('s3://boilingdata-demo/test.parquet') LIMIT 1;"}
< {"messageType":"DATA","requestId":"reqIdNotFound","batchSerial":1,"totalBatches":1,"data":[{"registration_dttm":"2016-02-03 07:55:29+00","id":1,"first_name":"Amanda","last_name":"Jordan","email":"[email protected]","gender":"Female","ip_address":"1.197.201.2","cc":"6759521864920116","country":"Indonesia","birthdate":"3/8/1971","salary":49756.53,"title":"Internal Auditor","comments":"1E+02"}]}

Mosaic duckdb-server API Support

The Mosaic duckdb-server supports WebSocket connections with simple API.

You can use the generated signed WebSocket URL with Mosaic "clients" for using BoilingData instead of a local duckdb-server.

> {"sql":"SELECT 1;","type":"json"}
< [{"1":1}]
> {"sql":"SELECT * FROM parquet_scan('s3://boilingdata-demo/test.parquet') LIMIT 1;","type":"json"}
< [{"registration_dttm":"2016-02-03 07:55:29+00","id":1,"first_name":"Amanda","last_name":"Jordan","email":"[email protected]","gender":"Female","ip_address":"1.197.201.2","cc":"6759521864920116","country":"Indonesia","birthdate":"3/8/1971","salary":49756.53,"title":"Internal Auditor","comments":"1E+02"}]

Since there is no requestId (or similar) key to map requests and responses, only one request should be sent at a time. Also, as there is no batch fragment identifiers, multiple received messages should be assumed to belong to the same response set.

boilingdata-wss-url-signer's People

Contributors

dforsber avatar

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.