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

docs(tutorials): add new tutorials directory and JsonWriterDefaultStream tutorial #1498

Merged
merged 4 commits into from
Jan 28, 2022

Conversation

stephaniewang526
Copy link
Contributor

Porting over tutorial from #1497

@stephaniewang526 stephaniewang526 requested a review from a team January 27, 2022 23:12
@stephaniewang526 stephaniewang526 requested a review from a team as a code owner January 27, 2022 23:12
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. label Jan 27, 2022
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • .github/workflows/approve-readme.yaml
  • .github/workflows/auto-release.yaml
  • .github/workflows/ci.yaml
  • .github/workflows/samples.yaml

@stephaniewang526 stephaniewang526 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 28, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 28, 2022
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Not seeing what's running/validating the tutorial. Is that in another PR?

ApiFuture<AppendRowsResponse> future = writer.append(jsonArr);
AppendRowsResponse response = future.get();
}
System.out.println("Appended records successfully.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe finalize the stream to report the row count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how to finalize the default stream. (We don't finalize the stream in the existing WriteToDefaultStream snippet.)

Field.newBuilder("parent", StandardSQLTypeName.STRING)
.setMode(Field.Mode.REPEATED)
.build(),
Field.of("author", StandardSQLTypeName.STRING),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to show how to input some more complicated types, such as DateTime, Repeated and Struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a good idea - Veronica can make some improvements after this is merged in.

Copy link
Contributor

Choose a reason for hiding this comment

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

We could but I'm not sure it adds much to the sample. Creating the table isn't main purpose of the sample, and in the main body I'm just reading in JSON records and passing them to the writer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the schema again, I could change time_sec to a DateTime type, that actually makes the tutorial a little simpler, because my example query on the table currently uses TIMESTAMP_SECONDS to convert the value.

@stephaniewang526
Copy link
Contributor Author

Not seeing what's running/validating the tutorial. Is that in another PR?

We will push an IT and a README in a follow-up PR.
cc @VeronicaWasson

@stephaniewang526 stephaniewang526 requested a review from a team January 28, 2022 20:00
@stephaniewang526 stephaniewang526 merged commit fd1ecf2 into googleapis:main Jan 28, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 28, 2022
🤖 I have created a release *beep* *boop*
---


### [2.8.3](v2.8.2...v2.8.3) (2022-01-28)


### Dependencies

* **java:** update actions/github-script action to v5 ([#1339](#1339)) ([#1491](#1491)) ([7eea012](7eea012))
* update actions/github-script action to v5 ([#1492](#1492)) ([580c033](580c033))
* update dependency com.google.cloud:google-cloud-bigquery to v2.7.0 ([#1499](#1499)) ([0d414f8](0d414f8))
* upgrade google-cloud-shared-dependencies to v2.7.0 ([#1501](#1501)) ([3f75e83](3f75e83))


### Documentation

* **tutorials:** add a README.md ([#1500](#1500)) ([c50c6a0](c50c6a0))
* **tutorials:** add new tutorials directory and JsonWriterDefaultStream tutorial ([#1498](#1498)) ([fd1ecf2](fd1ecf2))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants