Socket
Socket
Sign inDemoInstall

bigquery

Package Overview
Dependencies
94
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

6

package.json
{
"name": "bigquery",
"version": "0.0.4",
"version": "0.0.5",
"repository":

@@ -10,6 +10,6 @@ { "type": "git",

"dependencies": {
"google-api-utility": "*",
"nodeutil": "0.0.29",
"google-api-utility": "0.0.13",
"nodeutil": "0.1.0",
"underscore": "~1.6.0"
}
}

@@ -12,7 +12,7 @@ # bigquery

## Apply service account
## Apply service account
Follow the doc: http://gappsnews.blogspot.tw/2013/10/connect-cloud-platform-bigquery-using.html
## Convert p12 key
## Convert p12 key (If use old version service account...)
From admin console, create a service account, save the client_secrets.json and it's key

@@ -29,14 +29,23 @@ ex: Translate p12 to pem

## Initial using old client_secret.json (will deprecated)
## Initial using Service Account json_file
Load bigquery lib, specify your project id then setup the service account and the client_secret.json file path, pem key file path for auth use.
If you are create the service account after 2015Q2, you will find the service account provide a json file formate download. The json file is like:
```
{
"private_key_id": "e7************************************e8",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIC***....skip...****AFW1Y\n-----END PRIVATE KEY-----\n",
"client_email": "86*********8-if***************************pq2@developer.gserviceaccount.com",
"client_id": "86*********8-if***************************pq2.apps.googleusercontent.com",
"type": "service_account"
}
```
The file is already include the secret file and the account information. We support to use the file for easy auth.
```
var bq = require('bigquery')
, fs = require('fs')
, prjId = 'your-bigquery-project-id'; //you need to modify this
bq.init({
client_secret: '/path-to-client_secret.json',
key_pem: '/path-to-key.pem'
json_file: '/path/to/your-service-account-json-file.json'
});

@@ -56,3 +65,18 @@ ```

## Initial using old client_secret.json (will deprecated)
Load bigquery lib, specify your project id then setup the service account and the client_secret.json file path, pem key file path for auth use.
```
var bq = require('bigquery')
, fs = require('fs')
, prjId = 'your-bigquery-project-id'; //you need to modify this
bq.init({
client_secret: '/path-to-client_secret.json',
key_pem: '/path-to-key.pem'
});
```
## Do Query

@@ -174,1 +198,14 @@

```
## Other request timeout parameters
If you want to add timeout parameter to restrict to your bigquery api request time. You can add timeout parameter to the init() like:
```
bq.init({
client_secret: __dirname + '/client_secret.json',
key_pem: __dirname + '/key.pem',
timeout:1000
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc