22.12.1 • Published 11 months ago

@rapidsai/sql v22.12.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

  node-rapids GPU accelerated SQL engine

Installation

npm install @rapidsai/sql

About

These js bindings allow for GPU accelerated SQL queries.

For example, the following snippet creates a DataFrame, then uses our SQL engine to select and query a DataFrame using the SQLContext module.

var { Series, DataFrame, Int32 } = require("@rapidsai/cudf");
var { SQLContext } = require("@rapidsai/sql");

var a  = Series.new({type: new Int32(), data: [1, 2, 3]});
var b  = Series.new({type: new Int32(), data: [4, 5, 6]});
var df = new DataFrame({'a': a, 'b': b});

var sqlContext = new SQLContext();
sqlContext.createDataFrameTable('test_table', df);

await sqlContext.sql('SELECT a FROM test_table').result(); // [1, 2, 3]

We have also provided the SQLCluster module which allows one to run SQL queries on multiple GPUs.

var { Series, DataFrame } = require("@rapidsai/cudf");
var { SQLCluster } = require("@rapidsai/sql");

var a  = Series.new(['foo', 'bar']);
var df = new DataFrame({'a': a});

var sqlCluster = await SQLCluster.init({numWorkers: 2});
await sqlCluster.createDataFrameTable('test_table', df);

await sqlCluster.sql('SELECT a FROM test_table WHERE a LIKE \'%foo%\'');  // ['foo']

For detailed SQL API, follow our API Documentation.

22.12.1

11 months ago

22.12.0

12 months ago

22.8.2

1 year ago

22.8.1

2 years ago

22.8.0

2 years ago

22.6.2

2 years ago

22.6.1

2 years ago

22.6.0

2 years ago