mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
b6da74d424
commit
038d3d5031
2 changed files with 11 additions and 13 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue