Skip to content

Commit

Permalink
Merge branch 'main' into project-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Jan 9, 2024
2 parents a3108fc + a16e2fb commit 5ae8736
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ For example, if it is currently `2022-05-05T12:34:56Z`, the range will be `["202
# - DestinationFormat allows for custom-named copies using directives:
# - %RANGE_START_ISO - e.g., 2022-05-04T00:00:00.000Z
# - %RANGE_END_ISO - e.g., 2022-05-05T00:00:00.000Z
# - %RANGE_START_DATE_ISO - e.g., 2022-05-04
# - %RANGE_END_DATE_ISO - e.g., 2022-05-05
# - %TYPE - e.g., downloads, episode_metadata, etc
# - %REQUEST_ID - A unique identifier for the Lambda invocation
# - %REQUEST_TIME - A unix timestamp in milliseconds
Expand Down
8 changes: 8 additions & 0 deletions src/make_copies.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@ export default async function makeCopies(
/%RANGE_START_ISO/g,
config.inclusiveRangeStart.toISOString()
)
.replace(
/%RANGE_START_DATE_ISO/g,
config.inclusiveRangeStart.toISOString().split("T")[0]
)
.replace(
/%RANGE_END_ISO/g,
config.exclusiveRangeEnd.toISOString()
)
.replace(
/%RANGE_END_DATE_ISO/g,
config.exclusiveRangeEnd.toISOString().split("T")[0]
)
.replace(/%TYPE/g, extractionType)
.replace(/%REQUEST_ID/g, config.requestId)
.replace(/%REQUEST_TIME/g, +config.requestTime)
Expand Down
2 changes: 1 addition & 1 deletion src/query-jobs/boostr_impressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export default async function job(config) {
const query = `
SELECT
timestamp_trunc(timestamp, day) AS Date,
FORMAT_TIMESTAMP("%m/%d/%Y", timestamp) AS Date,
external_id AS \`Ad Server Line\`,
count(*) AS Impressions
FROM ${process.env.BIGQUERY_DATASET}.dt_impressions
Expand Down

0 comments on commit 5ae8736

Please sign in to comment.