Janusz Piwek
Janusz Piwek

Reputation: 69

Google Cloud Functions PubSub Data to BigQuery

I want to stream MQTT sensor data to Google BigQuery via a Google Cloud Function PubSub Tigger. Somehow I can't import BigQuery ... const BigQuery = require('@google-cloud/bigquery');

Detailed stack trace: Error: Cannot find module '@google-cloud/bigquery'

Thanks

Upvotes: 0

Views: 483

Answers (1)

Pavan Kumar Kattamuri
Pavan Kumar Kattamuri

Reputation: 335

I think you missed the package in package.json dependencies file.

"dependencies": {
    "@google-cloud/bigquery": "0.10.0",
     ...
}

Here is an example in nodejs Cloud Function using Bigquery

Upvotes: 0

Related Questions