Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

YACHT-1026: partitions that have no backups were filter out in SLI queries - fix #64

Merged
merged 3 commits into from
Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion terraform/SLI_3_days_views.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "google_bigquery_table" "SLI_3_days_view" {
census.datasetId=last_backups.source_dataset_id AND
census.tableId=last_backups.source_table_id
WHERE
IFNULL(census.partitionId, 'null')=IFNULL(last_backups.source_partition_id, 'null')
(last_backups.source_partition_id IS NULL OR last_backups.source_partition_id=census.partitionId)
AND projectId != "${var.bbq_project}"
AND partitionId != "__UNPARTITIONED__"
AND IFNULL(last_backups.backup_created, MSEC_TO_TIMESTAMP(0)) < TIMESTAMP(DATE_ADD(CURRENT_TIMESTAMP(), -3 , "DAY"))
Expand Down
2 changes: 1 addition & 1 deletion terraform/SLI_4_days_views.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "google_bigquery_table" "SLI_4_days_view" {
census.datasetId=last_backups.source_dataset_id AND
census.tableId=last_backups.source_table_id
WHERE
IFNULL(census.partitionId, 'null')=IFNULL(last_backups.source_partition_id, 'null')
(last_backups.source_partition_id IS NULL OR last_backups.source_partition_id=census.partitionId)
AND projectId != "${var.bbq_project}"
AND partitionId != "__UNPARTITIONED__"
AND IFNULL(last_backups.backup_created, MSEC_TO_TIMESTAMP(0)) < TIMESTAMP(DATE_ADD(CURRENT_TIMESTAMP(), -4 , "DAY"))
Expand Down
2 changes: 1 addition & 1 deletion terraform/SLI_5_days_views.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "google_bigquery_table" "SLI_5_days_view" {
census.datasetId=last_backups.source_dataset_id AND
census.tableId=last_backups.source_table_id
WHERE
IFNULL(census.partitionId, 'null')=IFNULL(last_backups.source_partition_id, 'null')
(last_backups.source_partition_id IS NULL OR last_backups.source_partition_id=census.partitionId)
AND projectId != "${var.bbq_project}"
AND partitionId != "__UNPARTITIONED__"
AND IFNULL(last_backups.backup_created, MSEC_TO_TIMESTAMP(0)) < TIMESTAMP(DATE_ADD(CURRENT_TIMESTAMP(), -5 , "DAY"))
Expand Down
2 changes: 1 addition & 1 deletion terraform/SLI_7_days_views.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "google_bigquery_table" "SLI_7_days_view" {
census.datasetId=last_backups.source_dataset_id AND
census.tableId=last_backups.source_table_id
WHERE
IFNULL(census.partitionId, 'null')=IFNULL(last_backups.source_partition_id, 'null')
(last_backups.source_partition_id IS NULL OR last_backups.source_partition_id=census.partitionId)
AND projectId != "${var.bbq_project}"
AND partitionId != "__UNPARTITIONED__"
AND IFNULL(last_backups.backup_created, MSEC_TO_TIMESTAMP(0)) < TIMESTAMP(DATE_ADD(CURRENT_TIMESTAMP(), -7 , "DAY"))
Expand Down