2.0.0 • Published 12 months ago

@mondomob/gae-js-bigquery v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

GAE JS BIGQUERY

Simplifies BigQuery client initialisation and common BigQuery operations.

Installation

npm install @mondomob/gae-js-bigquery

Quick Start

Using BigQuery Provider

To have a global BigQuery instance available to your entire application, initialise the bigQueryProvider. This will initialise the BigQuery client based on your current configuration. The instance can then be recalled anywhere within your application as required.

// On app startup
bigQueryProvider.init();

// Elsewhere in the app
const bigQuery = bigQueryProvider.get();

Manual connect to BigQuery

To manage your own BigQuery instances, use connectBigQuery to connect to BigQuery based on your current application configuration.

class CustomBigQueryService {
  private readonly bigQuery: BigQuery;

  constructor() {
    this.bigQuery = connectBigQuery()
  }
}

Edit configuration

No configuration is required if you are happy with the default conventions.

The following options are available under the bigQuery namespace.

PropertyDescriptionRequired
projectIdthe BigQuery projectId to connect to. Will default to the application's project id.N

e.g.

{
  "bigQuery": {
    "projectId": "my-bigquery-project"
  }
}
1.0.1

12 months ago

1.0.0

1 year ago

2.0.0

12 months ago

0.3.2

1 year ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago