nodejs-bigquery

Node.js client for Google Cloud BigQuery: A fast, economical and fully-managed enterprise data warehouse for large-scale data analytics.

APACHE-2.0 License

Downloads
3.1M
Stars
458
Committers
74

Bot releases are hidden (Show)

nodejs-bigquery - @google-cloud/bigquery v0.12.0

Published by lukesneeringer almost 7 years ago

release level

⚠️ Breaking Changes!

  • The import and export methods have been renamed to use the verbs load and extract (#39)
    • This is to provide consistency with the BigQuery API documentation and other languages' library implementations.
  • Renamed all start- methods. This also encompasses the renames in the previous item. (#42)
    • The startQuery method on the base object:
      - BigQuery#startQuery
      + BigQuery#createQueryJob
      
    • The job creation methods on the table object:
      - BigQuery/table#startCopy
      + BigQuery/table#createCopyJob
      
      - BigQuery/table#startCopyFrom
      + BigQuery/table#createCopyFromJob
      
      - BigQuery/table#startExport
      + BigQuery/table#createExtractJob
      
      - BigQuery/table#startImport
      + BigQuery/table#createLoadJob
      

Documentation

  • Redirect developers to use the startQuery method if they need manual pagination. (#38)
  • Improved documentation for manual pagination. (#44)

Implementation Details

  • Change to a new linter (ESLint) and code style formatter (prettify).
  • Update docs to use JSDoc 3.
nodejs-bigquery - v0.11.1

Published by stephenplusplus almost 7 years ago

release level

Fixes

  • (#16): Allow null and undefined values to table#insert(). (Thanks, @swftvsn!)
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

release level

Repository location change

The code has been migrated from GoogleCloudPlatform repository to googleapis/nodejs-bigquery.

Fixes

  • #2666: add simple benchmarks
  • #2741: properly handle custom types with Table#insert()
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Update

$ npm install @google-cloud/[email protected]

⚠️ Breaking Changes!

  • The default value for useLegacySql has changed from true to false.
  • All methods that created a job object have been split into two different methods - high and low level.

High Level

table.copy(function(err, job, apiResponse) {});

has become

table.copy(function(err, apiResponse) {});

Low Level

table.copy(function(err, job, apiResponse) {});

has become

table.startCopy(function(err, job, apiResponse) {});
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Fixes

  • (#2382, #2385) Upgrade dependency for Node 6 compatibility.
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Fixes

  • (#1503, #2337, #2341) Remove extraneous data from query result API requests.
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Fixes

  • (#2182, #2185): Support proper query strings on getJobs().
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Update

$ npm install @google-cloud/[email protected]

⚠️ Breaking Changes!

Dropped support for Node v0.12.x

(https://github.com/GoogleCloudPlatform/google-cloud-node/pull/2171)

We've officially dropped support for Node v0.12.x in all of our APIs. It may still work, but it is not officially supported and may stop working at any time.

nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Update

$ npm install @google-cloud/[email protected]

Features

Fixes

  • (#1812, #1853): Confirm apiResponse argument presence. (Thanks, @blacksonic!)
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Update

$ npm install @google-cloud/[email protected]

⚠️ Breaking Changes!

Partial failures are now treated as errors

(#1644, #1760)

Previously, when inserting multiple rows of data into a table, if any of them failed to insert, the failed insertion errors were passed in a separate argument to the callback. We've since introduced a custom error type called PartialFailureError, which is returned as the first err argument to your callback.

Before

table.insert(data, function(err, insertErrors, apiResponse) {
  if (err) {
    // An API error occurred.
  }

  if (insertErrors.length > 0) {
    // Some rows failed to insert, while others may have succeeded.
    //
    // insertErrors[].row (original row object passed to `insert`)
    // insertErrors[].errors[].reason
    // insertErrors[].errors[].message
  }
});

After

table.insert(data, function(err, apiResponse) {
  if (err) {
    // An API error or partial failure occurred.

    if (err.name === 'PartialFailureError') {
      // Some rows failed to insert, while others may have succeeded.

      // err.errors[].row (original row object passed to `insert`)
      // err.errors[].errors[].reason
      // err.errors[].errors[].message
    }
  }
});

Fixes

  • (#1747, #1748): Properly honor sourceFormat option on table.import().
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Updating

$ npm install @google-cloud/[email protected]

⚠️ Breaking Changes

Promises have arrived!

Issue: #551
PR: #1701

It's been a long time coming, but we're finally here. We've shipped promise support in the Google Cloud BigQuery module!

Do I have to use promises?

Nope, carry on. (But keep reading if you use streams)

How do I use promises?

Don't pass a callback:

var bigquery = require('@google-cloud/bigquery')();

bigquery.getDatasets()
  .then(function(data) {
    var datasets = data[0];
  })
  .catch(function(err) {});

How do I use a method as a stream?

All of the streaming functionality from our methods have been moved to their own method.

var bigquery = require('@google-cloud/bigquery')();

- bigquery.getDatasets()
+ bigquery.getDatasetsStream()
    .on('data', function(dataset) {})

- bigquery.getJobs()
+ bigquery.getJobsStream()
    .on('data', function(job) {})

- bigquery.query('SELECT ...')
+ bigquery.createQueryStream('SELECT ...')
    .on('data', function(row) {})
var dataset = bigquery.dataset('my-dataset-name');

- dataset.getTables()
+ dataset.getTablesStream()
    .on('data', function(table) {})

- dataset.query('SELECT ...')
+ dataset.createQueryStream('SELECT ...')
    .on('data', function(row) {})
var table = dataset.table('my-table-name');

- table.getRows()
+ table.createReadStream()
    .on('data', function(row) {})

- table.query('SELECT ...')
+ table.createQueryStream('SELECT ...')
    .on('data', function(row) {})
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Updating

$ npm install @google-cloud/[email protected]

Features

  • (#1535, #1590, #1605): Sync dependencies with other service modules to minimize download and installation time as much as possible.
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Updating

$ npm install @google-cloud/[email protected]

Features

  • (#1422, #1564): Automatically assign record type for nested schemas.
nodejs-bigquery -

Published by alexander-fenster almost 7 years ago

Updating

$ npm install @google-cloud/[email protected]

Fixes