Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes old sample #3364

Merged
merged 2 commits into from
Jun 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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