mirror of
https://github.com/google/nomulus
synced 2026-01-05 04:56:03 +00:00
Fix latest_snapshot "pointer" query to use to fully-qualified table reference
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125105776
This commit is contained in:
@@ -89,17 +89,16 @@ public class UpdateSnapshotViewAction implements Runnable {
|
||||
.setDatasetId(LATEST_SNAPSHOT_DATASET)
|
||||
.setTableId(kindName))
|
||||
.setView(new ViewDefinition().setQuery(
|
||||
SqlTemplate.create("SELECT * FROM [%DATASET%.%TABLE%]")
|
||||
SqlTemplate.create("SELECT * FROM [%PROJECT%:%DATASET%.%TABLE%]")
|
||||
.put("PROJECT", projectId)
|
||||
.put("DATASET", datasetId)
|
||||
.put("TABLE", tableId)
|
||||
.build())));
|
||||
|
||||
logger.infofmt(
|
||||
"Updated view %s:%s to point at snapshot table %s:%s.",
|
||||
LATEST_SNAPSHOT_DATASET,
|
||||
kindName,
|
||||
datasetId,
|
||||
tableId);
|
||||
"Updated view %s to point at snapshot table %s.",
|
||||
String.format("[%s:%s.%s]", projectId, LATEST_SNAPSHOT_DATASET, kindName),
|
||||
String.format("[%s:%s.%s]", projectId, datasetId, tableId));
|
||||
}
|
||||
|
||||
private static void updateTable(Bigquery bigquery, Table table) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user