You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
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.