Socket
Book a DemoInstallSign in
Socket

big-query-stream

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

big-query-stream

big-query-stream ===

latest
Source
npmnpm
Version
1.5.4
Version published
Maintainers
1
Created
Source

big-query-stream

stream data into and out of big query

var BigQueryStream = require('big-query-stream');

var bigQuery = new BigQueryStream(key, email, project, dataset, table);
// bigQuery is a writable stream
var query = bigQuery.query('select * from table');
// query is a readable stream

bigQuery.maybeCreateTable(schema).then(success, fail)
// create the table if it doesn't exist, do nothing if it exists

bigQuery.createTable(schema).then(success, fail)
// create the table if it doesn't exist, throw error if it exists

query takes an optional second parameter which is a job id for a query, it will use this to load cached results if possible, if it can't find the job or can't find the table the job refers to it runs the job like normal.

the query emits a jobid event when it creates a job which you can use in order to take advantage of cached queries.

schemes for table creation should be objects where they keys represent the column name and the value is the type.

FAQs

Package last updated on 30 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts