Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Sep 13, 2024
1 parent f2320cd commit 3ce149b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/query-jobs/boostr_impressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* @param {ExportConfig} config
*/
export default async function job(config) {
const ds = process.env.BIGQUERY_DATASET;
const query = `
SELECT
FORMAT_TIMESTAMP("%m/%d/%Y", i.timestamp) AS Date,
COALESCE(x.external_id, f.external_id) AS \`Ad Server Line\`,
COUNT(*) AS Impressions
FROM ${process.env.BIGQUERY_DATASET}.dt_impressions i
INNER JOIN ${process.env.BIGQUERY_DATASET}.flights f ON (i.flight_id = f.id)
LEFT JOIN ${process.env.BIGQUERY_DATASET}.flight_collection_external_ids x ON (f.id = x.flight_id AND i.feeder_podcast = x.podcast_id)
FROM ${ds}.dt_impressions i
INNER JOIN ${ds}.flights f ON (i.flight_id = f.id)
LEFT JOIN ${ds}.flight_collection_external_ids x ON (f.id = x.flight_id AND i.feeder_podcast = x.podcast_id)
WHERE i.timestamp >= ?
AND i.timestamp < ?
AND i.is_duplicate = FALSE
Expand Down

0 comments on commit 3ce149b

Please sign in to comment.