googleapis / java-bigquery

Apache License 2.0
112 stars 121 forks source link

docs: Update SimpleApp to explicitly set project id #3534

Closed PhongChuong closed 1 month ago

PhongChuong commented 1 month ago

When running in Google Cloud console, the default google cloud project might not be set leading to 404 errors. This update requires the reader to explicitly set the project value.

This also removes the explicit use of UUID to set jobId as the library now internally generates the value.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

If you write sample code, please follow the samples format.

snippet-bot[bot] commented 1 month ago

Here is the summary of changes.

You are about to add 3 region tags. - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:44](https://github.com/googleapis/java-bigquery/blob/26ac47881284573b949a2bb96e00b886e9be2bc9/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L44), tag `bigquery_simple_app_client` - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:47](https://github.com/googleapis/java-bigquery/blob/26ac47881284573b949a2bb96e00b886e9be2bc9/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L47), tag `bigquery_simple_app_query` - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:77](https://github.com/googleapis/java-bigquery/blob/26ac47881284573b949a2bb96e00b886e9be2bc9/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L77), tag `bigquery_simple_app_print`
You are about to delete 3 region tags. - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:36](https://github.com/googleapis/java-bigquery/blob/cad26430f21a37eec2b87ea417f0cf67dcf9c97a/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L36), tag `bigquery_simple_app_client` - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:39](https://github.com/googleapis/java-bigquery/blob/cad26430f21a37eec2b87ea417f0cf67dcf9c97a/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L39), tag `bigquery_simple_app_query` - [samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java:70](https://github.com/googleapis/java-bigquery/blob/cad26430f21a37eec2b87ea417f0cf67dcf9c97a/samples/snippets/src/main/java/com/example/bigquery/SimpleApp.java#L70), tag `bigquery_simple_app_print`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

PhongChuong commented 1 month ago

Thanks for the review.