Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.22.0')
implementation platform('com.google.cloud:libraries-bom:26.23.0')

implementation 'com.google.cloud:google-cloud-bigquery'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-bigquery:2.31.2'
implementation 'com.google.cloud:google-cloud-bigquery:2.32.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.31.2"
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.32.0"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -351,7 +351,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquery/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquery.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.31.2
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.32.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.cloud.bigquery.TableDefinition;
import com.google.cloud.bigquery.TableId;
import com.google.cloud.bigquery.TableInfo;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -53,10 +54,7 @@ public static void insertingDataTypes(String datasetName, String tableName) {
// Inserting data types
Field name = Field.of("name", StandardSQLTypeName.STRING);
Field age = Field.of("age", StandardSQLTypeName.INT64);
Field school =
Field.newBuilder("school", StandardSQLTypeName.BYTES)
.setMode(Field.Mode.REPEATED)
.build();
Field school = Field.of("school", StandardSQLTypeName.BYTES);
Field location = Field.of("location", StandardSQLTypeName.GEOGRAPHY);
Field measurements =
Field.newBuilder("measurements", StandardSQLTypeName.FLOAT64)
Expand Down Expand Up @@ -86,7 +84,7 @@ public static void insertingDataTypes(String datasetName, String tableName) {
Map<String, Object> rowContent = new HashMap<>();
rowContent.put("name", "Tom");
rowContent.put("age", 30);
rowContent.put("school", "Test University".getBytes());
rowContent.put("school", Base64.getEncoder().encodeToString("Test University".getBytes()));
rowContent.put("location", "POINT(1 2)");
rowContent.put("measurements", new Float[] {50.05f, 100.5f});
rowContent.put("datesTime", datesTimeContent);
Expand Down