-
Notifications
You must be signed in to change notification settings - Fork 565
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
- Search the issues already opened: https://github.com/googleapis/google-cloud-ruby/issues ✅
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby ✅
If you are still having issues, please be sure to include as much information as possible:
Environment details
- OS: OSX 11.2.1
- Ruby version: ruby 2.6.3p62
- Gem name and version: google-cloud-bigquery (1.16.0)
Steps to reproduce
- establish connection to bigquery
- Run query with multiple
SELECT,INSERTor a singleCREATE [OR REPLACE] PROCEDURE - see error
undefined method `dataset_id' for nil:NilClass
Code example
credentials = { ... }
multi_insert_statement = "INSERT into `sql-app-00000.ds1.test_set`(foo) values ('foo');
INSERT into `sql-app-00000.ds1.test_set`(foo) values ('foo');"
bigquery_client = Google::Cloud::Bigquery.new(credentials: credentials)
bigquery_client.query(multi_insert_statement)
> undefined method `dataset_idFull backtrace
irb(main):030:0> client = Google::Cloud::Bigquery.new(credentials: credentials)
=> #<Google::Cloud::Bigquery::Project:0x0000... @service=Google::Cloud::Bigquery::Service(sql-app-XXXXX)>
irb(main):031:0> client.query statement
Traceback (most recent call last):
1: from (irb):31
NoMethodError (undefined method `dataset_id' for nil:NilClass)rescued error.backtrace:
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/service.rb:500:in `rescue in execute'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/service.rb:493:in `execute'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/service.rb:354:in `job_query_results'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/query_job.rb:538:in `block in wait_until_done!'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/query_job.rb:537:in `loop'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/query_job.rb:537:in `wait_until_done!'
/usr/local/bundle/ruby/2.6.0/gems/google-cloud-bigquery-1.16.0/lib/google/cloud/bigquery/project.rb:769:in `query'
Traced with breakpoints
Tracing with breakpoints leads me to the source at
| @gapi.configuration.query.destination_table.dataset_id |
Called in
| def data token: nil, max: nil, start: nil |
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.