-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.
Description
I simply changed the dataset, tableName specific to my project and ran the class samples/snippets/src/main/java/com/example/bigquery/UpdateViewQuery.java.
It does not update the View query.
Reason I found.
ViewDefinition viewDefinition = viewMetadata.getDefinition();
viewDefinition.toBuilder().setQuery(query).build();
// Set metadata
bigquery.update(viewMetadata.toBuilder().setDefinition(viewDefinition).build());
The above code snippet creates a new ViewDefinition using the toBuilder() method but never really passes it to the bigquery.update() method. Old viewDefinition instance is passed. So the view query remains the same.
Is it intentional?
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.samplesIssues that are directly related to samples.Issues that are directly related to samples.type: docsImprovement to the documentation for an API.Improvement to the documentation for an API.