Skip to content

Commit 3665234

Browse files
authored
---
yaml --- r: 8549 b: refs/heads/snehashah-bugfix c: ddcaaab h: refs/heads/master i: 8547: 56d3583
1 parent 37954f0 commit 3665234

189 files changed

Lines changed: 16876 additions & 2582 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ refs/heads/vkedia-patch-3: 4d128043acaa7db9160faf439d2ca6104e8a88cb
7373
refs/tags/v0.23.0: e5405e1f6d144441b889acd3b6405fdcc3cdfd72
7474
refs/tags/v0.23.1: 30bcf8076ef9d71cc5a858d026cb907bb0954bec
7575
refs/tags/v0.24.0: b3cf61898d9c63d028fe088c14486721318d5fd5
76-
refs/heads/snehashah-bugfix: 3519c7cf10a882f31b8b0b40a8d47a95b779a743
76+
refs/heads/snehashah-bugfix: ddcaaab56fdd46d9a998ae55b1cc34474dad36f0

branches/snehashah-bugfix/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This client supports the following Google Cloud Platform services at a [GA](#ver
2121
This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:
2222

2323
- [BigQuery](google-cloud-bigquery) (Beta)
24+
- [Cloud Firestore](google-cloud-firestore) (Beta)
2425
- [Cloud Pub/Sub](google-cloud-pubsub) (Beta)
2526
- [Cloud Spanner](google-cloud-spanner) (Beta)
2627
- [Cloud Natural Language](google-cloud-language) (Beta)
@@ -49,16 +50,16 @@ If you are using Maven, add this to your pom.xml file
4950
<dependency>
5051
<groupId>com.google.cloud</groupId>
5152
<artifactId>google-cloud</artifactId>
52-
<version>0.24.0-alpha</version>
53+
<version>0.25.0-alpha</version>
5354
</dependency>
5455
```
5556
If you are using Gradle, add this to your dependencies
5657
```Groovy
57-
compile 'com.google.cloud:google-cloud:0.24.0-alpha'
58+
compile 'com.google.cloud:google-cloud:0.25.0-alpha'
5859
```
5960
If you are using SBT, add this to your dependencies
6061
```Scala
61-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.24.0-alpha"
62+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.25.0-alpha"
6263
```
6364

6465
For running on Google App Engine, see [more instructions here](./APPENGINE.md).

branches/snehashah-bugfix/google-cloud-bigquery/README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-bigquery</artifactId>
25-
<version>0.24.0-beta</version>
25+
<version>0.25.0-beta</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-bigquery:0.24.0-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.25.0-beta'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.24.0-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.25.0-beta"
3535
```
3636

3737
Example Application
@@ -125,7 +125,7 @@ Then add the following code to create the table:
125125
```java
126126
TableId tableId = TableId.of(datasetId, "my_table_id");
127127
// Table field definition
128-
Field stringField = Field.of("StringField", Field.Type.string());
128+
Field stringField = Field.of("StringField", LegacySQLTypeName.STRING);
129129
// Table schema definition
130130
Schema schema = Schema.of(stringField);
131131
// Create a table
@@ -172,7 +172,7 @@ for the result. Add the following imports at the top of your file:
172172

173173
```java
174174
import com.google.cloud.bigquery.FieldValue;
175-
import com.google.cloud.bigquery.QueryRequest;
175+
import com.google.cloud.bigquery.QueryJobConfiguration;
176176
import com.google.cloud.bigquery.QueryResponse;
177177

178178
import java.util.Iterator;
@@ -182,22 +182,17 @@ Then add the following code to run the query and wait for the result:
182182

183183
```java
184184
// Create a query request
185-
QueryRequest queryRequest =
186-
QueryRequest.newBuilder("SELECT * FROM my_dataset_id.my_table_id")
187-
.setMaxWaitTime(60000L)
188-
.setPageSize(1000L)
189-
.build();
185+
QueryJobConfiguration queryConfig =
186+
QueryJobConfiguration.of("SELECT * FROM my_dataset_id.my_table_id");
190187
// Request query to be executed and wait for results
191-
QueryResponse queryResponse = bigquery.query(queryRequest);
192-
while (!queryResponse.jobCompleted()) {
193-
Thread.sleep(1000L);
194-
queryResponse = bigquery.getQueryResults(queryResponse.getJobId());
195-
}
188+
QueryResponse queryResponse = bigquery.query(
189+
queryConfig,
190+
QueryOption.of(QueryResultsOption.maxWaitTime(60000L)),
191+
QueryOption.of(QueryResultsOption.pageSize(1000L)));
196192
// Read rows
197-
Iterator<List<FieldValue>> rowIterator = queryResponse.getResult().iterateAll();
198193
System.out.println("Table rows:");
199-
while (rowIterator.hasNext()) {
200-
System.out.println(rowIterator.next());
194+
for (FieldValues row : queryResponse.getResult().iterateAll()) {
195+
System.out.println(row);
201196
}
202197
```
203198
#### Complete source code

branches/snehashah-bugfix/google-cloud-bigquery/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-bigquery</artifactId>
5-
<version>0.24.1-beta-SNAPSHOT</version>
5+
<version>0.25.1-beta-SNAPSHOT</version>
66
<packaging>jar</packaging>
77
<name>Google Cloud BigQuery</name>
88
<url>https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigquery</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.24.1-alpha-SNAPSHOT</version>
15+
<version>0.25.1-alpha-SNAPSHOT</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

0 commit comments

Comments
 (0)