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:
|
shollyman
left a comment
There was a problem hiding this comment.
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.
Maybe finalize the stream to report the row count?
There was a problem hiding this comment.
There was a problem hiding this comment.
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.
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.
I think this is a good idea - Veronica can make some improvements after this is merged in.
There was a problem hiding this comment.
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.
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