mirror of
https://github.com/google/nomulus.git
synced 2025-07-01 08:43:34 +02:00
Upgrade activity reporting queries to StandardSQL
This also brings the SQL template parameters in-line with the anticipated Bigquery dataset format, and switches from DateTime to the more appropriate LocalDate (since we only need monthly granularity). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162747692
This commit is contained in:
parent
8a921f08ed
commit
33eb5f1c87
14 changed files with 160 additions and 171 deletions
|
@ -14,20 +14,16 @@
|
|||
|
||||
-- Query for DNS metrics.
|
||||
|
||||
-- Our DNS provider exports logs for all queries received. However, these
|
||||
-- tables only have a TTL of 7 days. We make daily exports of the data
|
||||
-- relevant to us, which allows us to get the full month's UDP and TCP
|
||||
-- queries when generating activity reports.
|
||||
-- This is a no-op until after we transition to Google Cloud DNS, which
|
||||
-- will likely export metrics via Stackdriver.
|
||||
|
||||
SELECT
|
||||
-- DNS metrics apply to all tlds, which requires the 'null' magic value.
|
||||
STRING(NULL) AS tld,
|
||||
metricName,
|
||||
-- TODO(b/63388735): Change this to actually query the DNS tables when ready.
|
||||
-1 AS count,
|
||||
FROM (
|
||||
SELECT
|
||||
'dns-udp-queries' AS metricName),
|
||||
(
|
||||
SELECT
|
||||
'dns-tcp-queries' AS metricName)
|
||||
-- TODO(b/63388735): Change this to actually query Google Cloud DNS when ready.
|
||||
-1 AS count
|
||||
FROM ((
|
||||
SELECT 'dns-udp-queries' AS metricName)
|
||||
UNION ALL
|
||||
(SELECT 'dns-tcp-queries' AS metricName))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue