Skip to content

Commit

Permalink
Rename annotation tables (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz authored Mar 31, 2023
1 parent 96fadaa commit f8421f3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions config/federation/bigquery/bq_daily_archive.sql.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WHERE -- The ETL SLO for reprocessing is two days, so only count archives from t
UNION ALL

-- Determines if reprocessing is working e2e.
SELECT "annotation" as datatype, COUNT(DISTINCT parser.ArchiveURL ) AS value_count,
FROM `{{PROJECT}}.raw_ndt.annotation`
SELECT "annotation2" as datatype, COUNT(DISTINCT parser.ArchiveURL ) AS value_count,
FROM `{{PROJECT}}.raw_ndt.annotation2`
WHERE -- The ETL SLO for reprocessing is two days, so only count archives from two days ago.
date = DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY)
8 changes: 4 additions & 4 deletions config/federation/bigquery/bq_gardener.sql.template
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ WITH all_types AS (
WHERE date > date('2019-01-01')
UNION ALL
SELECT
"raw_ndt.annotation" AS datatype,
"raw_ndt.annotation2" AS datatype,
id,
date,
parser.Time as parseTime,
FROM
`{{PROJECT}}.raw_ndt.annotation`
`{{PROJECT}}.raw_ndt.annotation2`
WHERE date > date('2019-01-01')
UNION ALL
SELECT
"raw_ndt.hopannotation1" AS datatype,
"raw_ndt.hopannotation2" AS datatype,
id,
date,
parser.Time as parseTime,
FROM
`{{PROJECT}}.raw_ndt.hopannotation1`
`{{PROJECT}}.raw_ndt.hopannotation2`
WHERE date > date('2019-01-01')
UNION ALL
SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ WITH all_types AS (
date > date('2019-01-01')
UNION ALL
SELECT
"annotation" AS datatype,
"annotation2" AS datatype,
id,
date,
parser.Time as parseTime,
FROM
`{{PROJECT}}.raw_ndt.annotation`
`{{PROJECT}}.raw_ndt.annotation2`
WHERE
date > date('2019-01-01')
UNION ALL
SELECT
"hopannotation1" AS datatype,
"hopannotation2" AS datatype,
id,
date,
parser.Time as parseTime,
FROM
`{{PROJECT}}.raw_ndt.hopannotation1`
`{{PROJECT}}.raw_ndt.hopannotation2`
WHERE
date > date('2019-01-01')
UNION ALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ FROM (
FROM `{{PROJECT}}.raw_ndt.ndt7`
WHERE date > DATE('2019-01-01') -- satisfy required date filter.
UNION ALL
SELECT "ndt/annotation" AS datatype, MIN(Parser.Time) AS min_parse_time
FROM `{{PROJECT}}.raw_ndt.annotation`
SELECT "ndt/annotation2" AS datatype, MIN(Parser.Time) AS min_parse_time
FROM `{{PROJECT}}.raw_ndt.annotation2`
WHERE date > date('2019-01-01')
UNION ALL
SELECT "ndt/hopannotation1" AS datatype, MIN(Parser.Time) AS min_parse_time
FROM `{{PROJECT}}.raw_ndt.hopannotation1`
SELECT "ndt/hopannotation2" AS datatype, MIN(Parser.Time) AS min_parse_time
FROM `{{PROJECT}}.raw_ndt.hopannotation2`
WHERE date > date('2019-01-01')
UNION ALL
SELECT "ndt/pcap" AS datatype, MIN(Parser.Time) AS min_parse_time
Expand Down

0 comments on commit f8421f3

Please sign in to comment.