From aa8d7cd094b072ff8ad4a5d76c6f1bb50dc62679 Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Wed, 30 Aug 2023 12:18:28 -0400 Subject: [PATCH] Remove leading spaces in SQL query The leading space are awkward to deal with after a copy+paste, where I often have to go in and remove them each manually. It would be nice to just have the copy+pasted query not have the leading spaces. --- src/data/gleanSql.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/data/gleanSql.js b/src/data/gleanSql.js index 36f2b2ce2..5a187727a 100644 --- a/src/data/gleanSql.js +++ b/src/data/gleanSql.js @@ -1,17 +1,17 @@ export const getGleanQuery = (columnName, table) => ` - -- Auto-generated by the Glean Dictionary. - -- https://docs.telemetry.mozilla.org/cookbooks/accessing_glean_data.html#accessing-glean-data-in-bigquery +-- Auto-generated by the Glean Dictionary. +-- https://docs.telemetry.mozilla.org/cookbooks/accessing_glean_data.html#accessing-glean-data-in-bigquery - SELECT - ${columnName} - FROM - ${table} AS m - WHERE - -- Pick yesterday's data from stable/historical tables. - -- https://docs.telemetry.mozilla.org/cookbooks/bigquery/querying.html#table-layout-and-naming - DATE(submission_timestamp) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) - -- IMPORTANT: Remove the limit clause when the query is ready. - LIMIT 10`; +SELECT + ${columnName} +FROM + ${table} AS m +WHERE + -- Pick yesterday's data from stable/historical tables. + -- https://docs.telemetry.mozilla.org/cookbooks/bigquery/querying.html#table-layout-and-naming + DATE(submission_timestamp) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) +-- IMPORTANT: Remove the limit clause when the query is ready. +LIMIT 10`; export const getGleanEventQuery = (table, additionalInfo) => ` -- Auto-generated by the Glean Dictionary.