Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@emartech/google-big-query
Advanced tools
Helper library to easily use Google BigQuery in NodeJS
Helper library to easily use Google BigQuery in NodeJS
@emartech/google-big-query
uses the config
package for configuration. You should make the following settings available under `"GoogleCloud" namespace:
{
"projectId": "",
"bucket": "",
"dataset": "",
"credentials": {},
"maximumBillingTier": 10
}
The project you'll use for billing.
The default dataset to connect to if it was not specified.
The credentials the connection will use.
Example:
{
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "example@my-service.iam.gserviceaccount.com"
}
More info about pricing: https://cloud.google.com/bigquery/pricing
const BigQuery = require('@emartech/google-big-query');
static
Creates a BigQuery instance.
Name | Type | Description |
---|---|---|
datasetName | string | The name of the default dataset. Default: config.GoogleCloud.dataset optional |
Type | Description |
---|---|
BigQuery | Instance of the BigQuery wrapper class. |
Constructor of BigQuery wrapper.
Name | Type | Description |
---|---|---|
datasetName | string | The name of the default dataset. |
client | @google-cloud/bigquery | The BigQuery client. |
Returns a Table instance for the given table name.
Name | Type | Description |
---|---|---|
tableName | string | The name of the table in the dataset |
Type | Description |
---|---|
Table | Google Cloud BigQuery Table class instance. |
This is a wrapper of the original createQueryStream() method.
Name | Type | Description |
---|---|---|
query | string or object | The query to run. More info about the parameter. |
Type | Description |
---|---|
ReadableStream |
This is a wrapper of the original query() method.
Name | Type | Description |
---|---|---|
query | string or object | The query to run. More info about the parameter. |
Type | Description |
---|---|
Promise |
generator
This is a wrapper of the original createQueryJob() method.
Name | Type | Description |
---|---|---|
options | object or string |
Type | Description |
---|---|
Promise |
let [job] = yield BigQuery.create().createQueryJob(query);
job.getQueryResultsStream({ maxResults: 100000, startIndex: 0 }).pipe(processRow);
generator
Creates the table with the specified schema.
Name | Type | Description |
---|---|---|
table | Table | The table instance |
schema | object | Schema definition of the table |
Type | Description |
---|---|
Table | The new Table. |
generator
Drops the given table if exists.
Name | Type | Description |
---|---|---|
table | Table | The table instance that should be dropped. |
generator
This is a wrapper of the original createTable() method.
Name | Type | Description |
---|---|---|
tableName | string | The name of the table. |
options | object | More info in the original documentation. optional |
Type | Description |
---|---|
Table | The new Table. |
static
static
static
generator
static
generator
static
static
generator
static
generator
static
static
generator
FAQs
Helper library to easily use Google BigQuery in NodeJS
The npm package @emartech/google-big-query receives a total of 9 weekly downloads. As such, @emartech/google-big-query popularity was classified as not popular.
We found that @emartech/google-big-query demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 125 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.