Skip to content

Commit 9df44a4

Browse files
author
Frank Natividad
committed
---
yaml --- r: 8783 b: refs/heads/lesv-patch-1 c: e46b57c h: refs/heads/master i: 8781: 5c68078 8779: 4e2d39c 8775: ab296a3 8767: 0fa305a
1 parent 0534857 commit 9df44a4

190 files changed

Lines changed: 2589 additions & 16883 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
@@ -66,7 +66,7 @@ refs/tags/v0.22.0: 18b298fe4bfe8ec2f20b0e0bf7ffdcce5cc3c5fe
6666
refs/heads/vam-google-patch-1: d0c8fee3a4074d0bf7360ce8c4f7f7223d0ee7b9
6767
refs/heads/vam-google-patch-CODEOWNERS: 2ac1616e25229e51d08a984708ef1918f91a35ee
6868
refs/heads/danoscarmike-patch-1: 7342a9916bce4ed00002c7202e2a16c5d46afaea
69-
refs/heads/lesv-patch-1: 97d50c2753708d66c7bc8a47a093cffdcb63d887
69+
refs/heads/lesv-patch-1: e46b57cd83f81806d0bfe2ce8993291057f089ff
7070
refs/heads/ml-update-branch: 079dd6610017f5c51b9d1938c12d6d55b61513cf
7171
refs/heads/vkedia-patch-2: 7d8241388a9769a5c069334761b06c7012c878e7
7272
refs/heads/vkedia-patch-3: 4d128043acaa7db9160faf439d2ca6104e8a88cb

branches/lesv-patch-1/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ 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)
2524
- [Cloud Pub/Sub](google-cloud-pubsub) (Beta)
2625
- [Cloud Spanner](google-cloud-spanner) (Beta)
2726
- [Cloud Natural Language](google-cloud-language) (Beta)
@@ -50,16 +49,16 @@ If you are using Maven, add this to your pom.xml file
5049
<dependency>
5150
<groupId>com.google.cloud</groupId>
5251
<artifactId>google-cloud</artifactId>
53-
<version>0.25.0-alpha</version>
52+
<version>0.24.0-alpha</version>
5453
</dependency>
5554
```
5655
If you are using Gradle, add this to your dependencies
5756
```Groovy
58-
compile 'com.google.cloud:google-cloud:0.25.0-alpha'
57+
compile 'com.google.cloud:google-cloud:0.24.0-alpha'
5958
```
6059
If you are using SBT, add this to your dependencies
6160
```Scala
62-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.25.0-alpha"
61+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.24.0-alpha"
6362
```
6463

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

branches/lesv-patch-1/google-cloud-bigquery/README.md

Lines changed: 18 additions & 13 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.25.0-beta</version>
25+
<version>0.24.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.25.0-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.24.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.25.0-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.24.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", LegacySQLTypeName.STRING);
128+
Field stringField = Field.of("StringField", Field.Type.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.QueryJobConfiguration;
175+
import com.google.cloud.bigquery.QueryRequest;
176176
import com.google.cloud.bigquery.QueryResponse;
177177

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

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

branches/lesv-patch-1/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.25.1-beta-SNAPSHOT</version>
5+
<version>0.24.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.25.1-alpha-SNAPSHOT</version>
15+
<version>0.24.1-alpha-SNAPSHOT</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

0 commit comments

Comments
 (0)