Skip to content

BigQuery table.import() complains about not having a project ID. #1984

@AKPWebDesign

Description

@AKPWebDesign

Despite having specified the project ID when creating the BigQuery object, I'm getting this error about there not being one specified when trying to use table.import().

Environment details

  • OS: Win 10 Pro
  • Node.js version: v7.5.0
  • npm version: v4.1.2
  • google-cloud-node version: bigquery v0.7.0

Steps to reproduce

  1. require @google-cloud/bigquery
  2. create BigQuery object specifying projectId in options
  3. create dataset object from BigQuery object, then table object from dataset
  4. table.import(jsonFile).then(...);

Error

Sorry, we cannot connect to Google Cloud Services without a project ID. You may specify one with an environment variable named "GCLOUD_PROJECT". See https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/authentication for a detailed guide on creating an authenticated connection.
    at Object.<anonymous> (%project%\node_modules\@google-cloud\common\src\util.js:55:29)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (%project%\node_modules\@google-cloud\common\src\service-object.js:32:12)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Metadata

Metadata

Labels

api: bigqueryIssues related to the BigQuery API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions