Skip to content

Commit adb9ad6

Browse files
authored
---
yaml --- r: 8787 b: refs/heads/lesv-patch-1 c: ddcaaab h: refs/heads/master i: 8785: 3fc5f65 8783: 9df44a4
1 parent d1bf609 commit adb9ad6

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
@@ -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: 3519c7cf10a882f31b8b0b40a8d47a95b779a743
69+
refs/heads/lesv-patch-1: ddcaaab56fdd46d9a998ae55b1cc34474dad36f0
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: 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/lesv-patch-1/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/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.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)