Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery: How do i get asynchronously a job query result with job id #374

Closed
jmunozz opened this issue May 3, 2017 · 2 comments
Closed
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@jmunozz
Copy link

jmunozz commented May 3, 2017

Hello,
I can't figure out how to perform asynchronous call to API to retrieve results from a query job with just jobId.

I tried bigquery.jobs.getQueryResult(jobId) => bigquery.jobs does not exist
I tried bigquery.getQueryResult(jobId) => the function does not exist

My guess is I first need to get a job ressource then execute ressource.getQueryResult() but I can't find how to get this job resource.

Thanks

@jmunozz jmunozz changed the title Which documentation do we have to refer ? How do i get asynchronously a job query result with job id May 3, 2017
@jmunozz jmunozz closed this as completed May 3, 2017
@jmunozz jmunozz reopened this May 3, 2017
@jmunozz jmunozz changed the title How do i get asynchronously a job query result with job id BigQuery: How do i get asynchronously a job query result with job id May 3, 2017
@jmdobry
Copy link
Member

jmdobry commented May 3, 2017

const bigquery = require('@google-cloud/bigquery')();

bigquery
  .job('your-job-id')
  .getQueryResults()
  .then(([rows]) => {
    console.log(rows);
  });

as seen here: https://googlecloudplatform.github.io/google-cloud-node/#/docs/bigquery/latest/bigquery/job

@jmunozz
Copy link
Author

jmunozz commented May 3, 2017

Thanks.
It works perfectly fine.
(I thought this version of the doc was deprecated because it shows '/bigquery/0.9.2' in the URL)

@jmdobry jmdobry closed this as completed May 3, 2017
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
ace-n pushed a commit that referenced this issue Nov 11, 2022
* chore(main): release 6.1.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this issue Nov 11, 2022
* chore(main): release 6.1.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this issue Nov 12, 2022
* chore(main): release 6.1.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this issue Nov 14, 2022
* chore(main): release 6.1.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
kweinmeister pushed a commit that referenced this issue Nov 18, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants