This repository was archived by the owner on Feb 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
tutorials/JsonWriterDefaultStream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public static void createDestinationTable(
6767 .build (),
6868 Field .of ("author" , StandardSQLTypeName .STRING ),
6969 Field .of ("committer" , StandardSQLTypeName .STRING ),
70- Field .of ("time_sec " , StandardSQLTypeName .INT64 ),
70+ Field .of ("ts " , StandardSQLTypeName .DATETIME ),
7171 Field .of ("subject" , StandardSQLTypeName .STRING ),
7272 Field .of ("message" , StandardSQLTypeName .STRING ),
7373 Field .of ("repo_name" , StandardSQLTypeName .STRING ));
Original file line number Diff line number Diff line change 1+ # BigQuery Write API streaming tutorial
2+
3+ This sample shows how to stream data from a JSON source into BigQuery by using
4+ the [ BigQuery Write API] ( https://cloud.google.com/bigquery/docs/write-api ) with
5+ the default stream.
6+
7+ ## Usage
8+
9+ Download the
10+ [ sample data file] ( https://storage.googleapis.com/cloud-samples-data/bigquery/tutorials/github.json ) .
11+
12+ From this directory, run:
13+
14+ ```
15+ mvn compile exec:java \
16+ -Dexec.mainClass=com.example.bigquerystorage.JsonWriterDefaultStream \
17+ -Dexec.args="project_id dataset table filepath`
18+ ```
19+
20+ where ` file_path ` is the path to the JSON data file.
21+
Original file line number Diff line number Diff line change 5757 </goals >
5858 <configuration >
5959 <sources >
60- <source >src/main/java </source >
61- <source >../snippets/src/main/java/com/example/bigquerystorage</source >
60+ <source >. </source >
61+ <source >../../samples/ snippets/src/main/java/com/example/bigquerystorage</source >
6262 </sources >
6363 </configuration >
6464 </execution >
8181 </plugin >
8282 </plugins >
8383 </build >
84- </project >
84+ </project >
You can’t perform that action at this time.
0 commit comments