Skip to content

Commit

Permalink
Removes old sample (#3364)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alixhami authored and pongad committed Jun 11, 2018
1 parent 86ea052 commit ccfdd61
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,6 @@ public void runLegacySqlQuery() throws InterruptedException {
// [END bigquery_query_legacy]
}

/**
* Example of running a query with Standard SQL explicitly set.
*/
public void runStandardSqlQuery() throws InterruptedException {
// [START bigquery_query_standard]
// BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;";
QueryJobConfiguration queryConfig =
// Note that setUseLegacySql is set to false by default
QueryJobConfiguration.newBuilder(query).setUseLegacySql(false).build();

// Print the results.
for (FieldValueList row : bigquery.query(queryConfig).iterateAll()) {
for (FieldValue val : row) {
System.out.printf("%s,", val.toString());
}
System.out.printf("\n");
}
// [END bigquery_query_standard]
}

/**
* Example of running a query and saving the results to a table.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ public void testRunLegacySqlQuery() throws InterruptedException {
assertTrue(got.contains("romeoandjuliet"));
}

@Test
public void testRunStandardSqlQuery() throws InterruptedException {
cloudSnippets.runStandardSqlQuery();
String got = bout.toString();
assertTrue(got.contains("romeoandjuliet"));
}

@Test
public void testRunQueryPermanentTable() throws InterruptedException {
String tableName = "test_destination_table";
Expand Down

0 comments on commit ccfdd61

Please sign in to comment.