1.0.14 • Published 6 months ago

@tiledb-inc/tiledb-cloud v1.0.14

Weekly downloads
46
License
MIT
Repository
github
Last release
6 months ago

TileDB Cloud library for NodeJS

TileDB-Cloud-JS is an axios-based NodeJS API for TileDB Cloud.

Note: This is an experimental package and aims to be similar to TileDB-Cloud-Py.

Installation

npm install @tiledb-inc/tiledb-cloud

Basic usage:

const tiledb = require("@tiledb-inc/tiledb-cloud");

// API tokens are the recommend way to access the cloud apis
const config = {
  apiKey: "<insert token from setting page here>"
};

// Username and passwords are also supported, uncomment below and comment out above to use username/password auth instead
// const config = {
//   username: "<tiledb-cloud-username>",
//   password: "<tiledb-cloud-password>"
// };

// First we must create API objects.
// In the future we will improve and simplify this interface
const arrayApi = new tiledb.ArrayApi(config);

arrayApi.getArraysInNamespace('<tiledb-cloud-username>').then((res) => {
  console.log(res);
}).catch((ex) => {
  console.log(ex);
});

Serverless SQL example:

const tiledb = require('@tiledb-inc/tiledb-cloud');

// API tokens are the recommend way to access the cloud apis
const config = {
  apiKey: "<insert token from setting page here>"
};

// Username and passwords are also supported, uncomment below and comment out above to use username/password auth instead
// const config = {
//   username: "<tiledb-cloud-username>",
//   password: "<tiledb-cloud-password>"
// };

// First we must create API objects.
// In the future we will improve and simplify this interface
const sqlAPI = new tiledb.SqlApi(config);

// SQL query
const sql = "select `rows`, AVG(a) as avg_a from `tiledb://TileDB-Inc/quickstart_dense` GROUP BY `rows`";

const sqlDetails = {
  query: sql
};

// Run SQL and print any returned data to console
sqlAPI.runSQL("<tiledb-cloud-username>", sqlDetails).then((res) => {
  console.log(res.data)
  /*
    Will print:
      [
        { avg_a: '2.5000', rows: 1 },
        { avg_a: '6.5000', rows: 2 },
        { avg_a: '10.5000', rows: 3 },
        { avg_a: '14.5000', rows: 4 }
      ]
   */
}).catch((ex) => {
  // handle error
});

Useful links

TileDB Cloud documentation
TileDB Cloud console
TileDB website

1.0.14-alpha.4

8 months ago

1.0.14-alpha.3

8 months ago

1.0.14-alpha.0

9 months ago

1.0.14-alpha.2

8 months ago

1.0.14-alpha.1

9 months ago

1.0.13-alpha.2

10 months ago

1.0.15-alpha.0

6 months ago

1.0.15-alpha.1

6 months ago

1.0.14

8 months ago

1.0.13

10 months ago

1.0.13-alpha.1

11 months ago

1.0.13-alpha.0

12 months ago

1.0.12

12 months ago

1.0.12-beta.1

1 year ago

1.0.12-beta.0

1 year ago

1.0.12-alpha.1

1 year ago

1.0.12-alpha.2

1 year ago

1.0.10-alpha.7

1 year ago

1.0.10-alpha.5

1 year ago

1.0.10-alpha.6

1 year ago

1.0.10-alpha.3

1 year ago

1.0.10-alpha.4

1 year ago

1.0.11

1 year ago

1.0.12-alpha.0

1 year ago

1.0.10

2 years ago

1.0.10-alpha.1

2 years ago

1.0.10-alpha.2

2 years ago

1.0.10-alpha.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.2

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-beta.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.8

3 years ago

0.0.7

4 years ago

0.1.0-beta.2

4 years ago

0.1.0-beta.1

4 years ago

0.1.0-beta.0

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago