GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added a snippet to show how to read a newline-delimited-json file and store it in a Table by happyhuman · Pull Request #2974 · googleapis/google-cloud-java

Conversation

@happyhuman

@happyhuman happyhuman commented Feb 28, 2018

Copy link
Copy Markdown

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@happyhuman
Added a snippet to show how to read a newline-delimited-json file fro…
44df38c
…m GCS and store it in a BQ Table.
@happyhuman
happyhuman requested a review from pongad as a code owner February 28, 2018 18:48
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2018
@happyhuman
happyhuman requested a review from garrettjonesgoogle February 28, 2018 18:50
pongad
pongad reviewed Mar 1, 2018
View reviewed changes
Comment thread ...oud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java Outdated
.build();
// Table field definition
ArrayList<Field> fields = new ArrayList<>();
for (String fieldName: fieldNames) {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...oud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java Outdated
fields.add(Field.of(fieldName, LegacySQLTypeName.STRING));
}
// Table schema definition
Schema schema = Schema.of(fields.toArray(new Field[fields.size()]));

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pongad
pongad requested a review from tswast March 1, 2018 03:24
tswast
tswast requested changes Mar 1, 2018
View reviewed changes
Comment thread ...oud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java Outdated
Schema schema = Schema.of(fields.toArray(new Field[fields.size()]));
// Create the table
StandardTableDefinition tableDefinition = StandardTableDefinition.of(schema);
bigquery.create(TableInfo.of(tableId, tableDefinition));

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...oud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java Outdated
// [TARGET writer(WriteChannelConfiguration)]
// [VARIABLE "my_dataset_name"]
// [VARIABLE "my_table_name"]
// [VARIABLE "my_source_uri")]

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...oud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java Outdated
// [VARIABLE "my_dataset_name"]
// [VARIABLE "my_table_name"]
// [VARIABLE "my_source_uri")]
// [VARIABLE "field_names")]

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

happyhuman added 3 commits March 5, 2018 11:22
@happyhuman
Made some changes based on the PR comments.
5d3e09b
@happyhuman
Made some changes based on the PR comments.
b3904d2
@happyhuman
Removed the unused imports.
cd95a6b
@happyhuman

happyhuman commented Mar 6, 2018

Copy link
Copy Markdown
Author

After talking to Tim, I made some changes. Can you please review the changes? Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tswast
tswast reviewed Mar 6, 2018
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sample LGTM, thanks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast

tswast commented Mar 6, 2018

Copy link
Copy Markdown
Contributor

Sorry I forgot about this earlier, but there's also a Python script to run which will ensure this sample gets included in the Javadocs for the library. The script is at https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/utilities/add_snippets_to_file.py

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

happyhuman added 3 commits March 9, 2018 10:13
@happyhuman
Fixed a number of other comments and annotations in BigQuerySnippets
babab5a
@happyhuman
Minor changes in the snippet description
5930f77
@happyhuman
Minor changes in the snippet description
17d39a0
tswast
tswast reviewed Mar 9, 2018
View reviewed changes
Comment thread google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java Outdated
* }
* } </pre>
*
* <p>Example of creating a dataset.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tswast
tswast reviewed Mar 9, 2018
View reviewed changes
Comment thread google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java Outdated
* String query =
* "SELECT distinct(corpus) FROM `bigquery-public-data.samples.shakespeare` where word_count > ?";
* <pre> {@code
* String query = "SELECT distinct(corpus) FROM `bigquery-public-data.samples.shakespeare` where;

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tswast
tswast approved these changes Mar 9, 2018
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Let's clean up some of the Javadoc strings in BigQuery.java manually and call this one done. I don't know what went wrong with the script.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast tswast assigned pongad Mar 9, 2018
@happyhuman
Cleaned up some of the auto generated java docs manually.
f7938bd
tswast
tswast approved these changes Mar 9, 2018
View reviewed changes
@tswast tswast assigned garrettjonesgoogle Mar 9, 2018
@pongad
pongad merged commit 848245e into master Mar 12, 2018
@pongad
pongad deleted the bq_remote_file_import branch March 12, 2018 00:28
@theacodes theacodes unassigned pongad Sep 28, 2018
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
@cloud-java-bot
chore: Update generation configuration at Tue May 13 02:32:01 UTC 2025 (
9f98e4d
#2974)

* chore: Update generation configuration at Tue May 13 02:32:01 UTC 2025

* chore: generate libraries at Tue May 13 02:32:31 UTC 2025
lqiu96 pushed a commit that referenced this pull request Mar 20, 2026
@cloud-java-bot
chore: Update generation configuration at Tue May 13 02:32:01 UTC 2025 (
7010c72
#2974)

* chore: Update generation configuration at Tue May 13 02:32:01 UTC 2025

* chore: generate libraries at Tue May 13 02:32:31 UTC 2025
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
@renovate-bot
deps: update googleapis/java-cloud-bom digest to 47c5dbc (#2974)
f3f4036
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| googleapis/java-cloud-bom | action | digest | `17cc5ec` -> `47c5dbc` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/googleapis/sdk-platform-java).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
@release-please
chore(main): release 2.43.0 (#2953)
c219e3e
🤖 I have created a release *beep* *boop*
---


<details><summary>2.43.0</summary>

##
[2.43.0](googleapis/sdk-platform-java@v2.42.0...v2.43.0)
(2024-07-25)


### Features

* add `transport` option to `generation_config.yaml`
([#3052](googleapis/sdk-platform-java#3052))
([2e6c95c](googleapis/sdk-platform-java@2e6c95c))
* get released version from versions.txt to render `README.md`
([#3007](googleapis/sdk-platform-java#3007))
([204e73b](googleapis/sdk-platform-java@204e73b))
* Introduce java.time to Gax-Java
([#1872](googleapis/sdk-platform-java#1872))
([300026a](googleapis/sdk-platform-java@300026a))
* Mark `getDefaultEndpoint()` with @ObsoleteApi
([#2347](googleapis/sdk-platform-java#2347))
([311d4ed](googleapis/sdk-platform-java@311d4ed))
* parse `BUILD.bzel` to determine whether a commit that only changed
`BUILD.bazel` is a qualified commit
([#2937](googleapis/sdk-platform-java#2937))
([254bf37](googleapis/sdk-platform-java@254bf37))


### Bug Fixes

* Fix:
([8d11e25](googleapis/sdk-platform-java@8d11e25))
* `BaseApiTracer` to noop on attemptFailed via overloaded method call
([#3016](googleapis/sdk-platform-java#3016))
([41532b4](googleapis/sdk-platform-java@41532b4))
* Generator to skip generation for empty services.
([#3051](googleapis/sdk-platform-java#3051))
([1af3059](googleapis/sdk-platform-java@1af3059))
* restore hermetic build image publication
([#2952](googleapis/sdk-platform-java#2952))
([2a5d36d](googleapis/sdk-platform-java@2a5d36d))


### Dependencies

* update dependency com.fasterxml.jackson:jackson-bom to v2.17.2
([#3028](googleapis/sdk-platform-java#3028))
([3c41fc4](googleapis/sdk-platform-java@3c41fc4))
* update dependency
com.google.cloud.opentelemetry:detector-resources-support to v0.30.0
([#2975](googleapis/sdk-platform-java#2975))
([10fe657](googleapis/sdk-platform-java@10fe657))
* update dependency
com.google.cloud.opentelemetry:detector-resources-support to v0.31.0
([#3044](googleapis/sdk-platform-java#3044))
([283c889](googleapis/sdk-platform-java@283c889))
* update dependency com.google.errorprone:error_prone_annotations to
v2.29.2
([#3058](googleapis/sdk-platform-java#3058))
([f8bd80c](googleapis/sdk-platform-java@f8bd80c))
* update dependency com.google.errorprone:error_prone_annotations to
v2.29.2
([#3059](googleapis/sdk-platform-java#3059))
([062add9](googleapis/sdk-platform-java@062add9))
* update dependency com.google.guava:guava to v33.2.1-jre
([#3027](googleapis/sdk-platform-java#3027))
([e305208](googleapis/sdk-platform-java@e305208))
* update dependency commons-codec:commons-codec to v1.17.1
([#3049](googleapis/sdk-platform-java#3049))
([7934920](googleapis/sdk-platform-java@7934920))
* update dependency dev.cel:cel to v0.6.0
([#3050](googleapis/sdk-platform-java#3050))
([ae465dc](googleapis/sdk-platform-java@ae465dc))
* update dependency net.bytebuddy:byte-buddy to v1.14.18
([#3029](googleapis/sdk-platform-java#3029))
([e5382c4](googleapis/sdk-platform-java@e5382c4))
* update dependency org.apache.commons:commons-lang3 to v3.15.0
([#3060](googleapis/sdk-platform-java#3060))
([d62f6da](googleapis/sdk-platform-java@d62f6da))
* update dependency org.checkerframework:checker-qual to v3.45.0
([#2988](googleapis/sdk-platform-java#2988))
([2b524e5](googleapis/sdk-platform-java@2b524e5))
* update google api dependencies
([#2951](googleapis/sdk-platform-java#2951))
([46ea538](googleapis/sdk-platform-java@46ea538))
* update google auth library dependencies to v1.24.0
([#3039](googleapis/sdk-platform-java#3039))
([55e9db2](googleapis/sdk-platform-java@55e9db2))
* update googleapis/java-cloud-bom digest to 47c5dbc
([#2974](googleapis/sdk-platform-java#2974))
([f3f4036](googleapis/sdk-platform-java@f3f4036))
* update grpc dependencies to v1.65.1
([#3061](googleapis/sdk-platform-java#3061))
([e587e23](googleapis/sdk-platform-java@e587e23))
* update junit5 monorepo to v5.10.3
([#2963](googleapis/sdk-platform-java#2963))
([4a8eb0a](googleapis/sdk-platform-java@4a8eb0a))
* update netty dependencies to v4.1.112.final
([#3057](googleapis/sdk-platform-java#3057))
([6b96a35](googleapis/sdk-platform-java@6b96a35))
* update opentelemetry-java monorepo to v1.40.0
([#3035](googleapis/sdk-platform-java#3035))
([564e4cb](googleapis/sdk-platform-java@564e4cb))
* Use Gapic-Showcase v0.35.1
([#3018](googleapis/sdk-platform-java#3018))
([82094b3](googleapis/sdk-platform-java@82094b3))


### Documentation

* add support option to 'new issue' choices
([#3055](googleapis/sdk-platform-java#3055))
([674401b](googleapis/sdk-platform-java@674401b))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Mar 30, 2026
@BenWhitehead
fix: update usages of String.format to explicitly pass Locale.US (#2974)
4e9ecb0
Usage of `Storage#format(String, Object...)` will use the default locale for it's formatting. This can lead to unexpected formatting if a right-to-left language such as Arabic is the default locale.

Update all usages to use `String.format(Locale.US, pattern, Object...)` so we ensure things like headers or error messages are formatted according to the US conventions which match `en_US` and ascii byte conventions.

Incidentally, things like right-to-left formatting seem to only apply to java11+ not java8.

Fixes #2972
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tswast tswast tswast approved these changes
@garrettjonesgoogle garrettjonesgoogle Awaiting requested review from garrettjonesgoogle
+1 more reviewer
@pongad pongad pongad left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@garrettjonesgoogle garrettjonesgoogle

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@happyhuman @tswast @pongad @googlebot @garrettjonesgoogle
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.