Skip to content

Commit

Permalink
Remove leading spaces in SQL query
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fbertsch authored and Linh committed Aug 31, 2023
1 parent 4b97fed commit aa8d7cd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/data/gleanSql.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit aa8d7cd

Please sign in to comment.