Skip to content

Commit ccfdd61

Browse files
alixhamipongad
authored andcommitted
Removes old sample (googleapis#3364)
* Removes old sample bigquery_query_standard has been removed because it is no longer being used in the docs. (a combination of bigquery_query and bigquery_query_legacy are being used instead) * Removes bigquery_query_standard test
1 parent 86ea052 commit ccfdd61

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,6 @@ public void runLegacySqlQuery() throws InterruptedException {
7171
// [END bigquery_query_legacy]
7272
}
7373

74-
/**
75-
* Example of running a query with Standard SQL explicitly set.
76-
*/
77-
public void runStandardSqlQuery() throws InterruptedException {
78-
// [START bigquery_query_standard]
79-
// BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
80-
String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
81-
QueryJobConfiguration queryConfig =
82-
// Note that setUseLegacySql is set to false by default
83-
QueryJobConfiguration.newBuilder(query).setUseLegacySql(false).build();
84-
85-
// Print the results.
86-
for (FieldValueList row : bigquery.query(queryConfig).iterateAll()) {
87-
for (FieldValue val : row) {
88-
System.out.printf("%s,", val.toString());
89-
}
90-
System.out.printf("\n");
91-
}
92-
// [END bigquery_query_standard]
93-
}
94-
9574
/**
9675
* Example of running a query and saving the results to a table.
9776
*/

google-cloud-examples/src/test/java/com/google/cloud/examples/bigquery/snippets/ITCloudSnippets.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ public void testRunLegacySqlQuery() throws InterruptedException {
6262
assertTrue(got.contains("romeoandjuliet"));
6363
}
6464

65-
@Test
66-
public void testRunStandardSqlQuery() throws InterruptedException {
67-
cloudSnippets.runStandardSqlQuery();
68-
String got = bout.toString();
69-
assertTrue(got.contains("romeoandjuliet"));
70-
}
71-
7265
@Test
7366
public void testRunQueryPermanentTable() throws InterruptedException {
7467
String tableName = "test_destination_table";

0 commit comments

Comments
 (0)