-
Notifications
You must be signed in to change notification settings - Fork 85
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
docs(tutorials): add new tutorials directory and JsonWriterDefaultStream tutorial #1498
Conversation
…eam tutorial porting over tutorial from googleapis#1497
Warning: This pull request is touching the following templated files:
|
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.
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."); |
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.
Maybe finalize the stream to report the row count?
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.
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.
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), |
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.
Do we need to show how to input some more complicated types, such as DateTime, Repeated and Struct?
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.
I think this is a good idea - Veronica can make some improvements after this is merged in.
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.
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.
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.
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.
We will push an IT and a README in a follow-up PR. |
🤖 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).
Porting over tutorial from #1497