googleapis / googleapis/google-cloud-java

[java-bigquery] [BigQuery: create(jobInfo)] QueryJob execution status is "DONE" but the destination table isn't created

オープン
#12,151 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
api: bigquery priority: p3 type: bug
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

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](https://cloud.google.com/support/) 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/java-bigquery/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform

If you are still having issues, please include as much information as possible:

#### Environment details

1. _Specify the API at the beginning of the title. For example, "BigQuery: ...")._
BigQuery: create(jobInfo), with
`JobInfo jobInfo = JobInfo.newBuilder(queryConfig).setJobId(jobId).build();`, so query config and job Id are generated in our code.
2. `OS type and version:` MacOs Sequoia 15.2
3. `Java version:` java 21
4. `version(s): `

#### Steps to reproduce
To include more details:
In our query job, what we do is we construct a SQL command which will select a bunch of records from a table, then we'll construct a QueryJobConfiguration in our code like this:
```
QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(sqlString)
.setDefaultDataset(datasetId)
.setDestinationTable(tempUnpartitionedTable)
.build();
JobInfo jobInfo = JobInfo.newBuilder(queryConfig).setJobId(jobId).build();
```
In 99% the case, it works very well. But recently we've hit some corner cases, where the queryJob's status returned as "DONE", however the destination table isn't created.
We made sure that the sql returns valid records so there're valid records to insert into destination table
We also leveraged bq show and confirmed that the query job "recordsRead":"1000","recordsWritten":"1000" are valid and look correct, but the destination table isn't created.

#### Code example
Provided above but let me know if you need more details.

#### Stack trace
A sample job Id, which has a DONE status but not bringing the selected records into destination table: copyToTempUnpartitionedTable_reconciliation-development_development_master_cleansed_payment_events_1_2024-04-09_00_0_1

#### External references such as API reference guides

#### Any additional information below

Following these steps guarantees the quickest resolution possible.

Thanks!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。