Skip to content

Commit

Permalink
match renamed table from spark-evaluate#349
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickNercessian committed Sep 6, 2024
1 parent 082ff93 commit 24b28e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stats/lib/platform-stats-fetchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { today, yesterday } from './request-helpers.js'
export const fetchDailyStationCount = async (pgPool, filter) => {
const { rows } = await pgPool.query(`
SELECT day::TEXT, station_count
FROM daily_measurements_summary
FROM daily_platform_stats
WHERE day >= $1 AND day <= $2
ORDER BY day
`, [filter.from, filter.to])
Expand Down Expand Up @@ -40,7 +40,7 @@ export const fetchMonthlyStationCount = async (pgPool, filter) => {
export const fetchDailyStationMeasurementCounts = async (pgPool, filter) => {
const { rows } = await pgPool.query(`
SELECT day::TEXT, accepted_measurement_count, total_measurement_count
FROM daily_measurements_summary
FROM daily_platform_stats
WHERE day >= $1 AND day <= $2
ORDER BY day
`, [filter.from, filter.to])
Expand Down
4 changes: 2 additions & 2 deletions stats/test/platform-routes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Platform Routes HTTP request handler', () => {
await pgPools.evaluate.query('DELETE FROM daily_participants')
await pgPools.evaluate.query('DELETE FROM participants')
await pgPools.evaluate.query('DELETE FROM monthly_active_station_count')
await pgPools.evaluate.query('DELETE FROM daily_measurements_summary')
await pgPools.evaluate.query('DELETE FROM daily_platform_stats')

await pgPools.evaluate.query('REFRESH MATERIALIZED VIEW top_measurement_participants_yesterday_mv')

Expand Down Expand Up @@ -351,7 +351,7 @@ const givenDailyMeasurementsSummary = async (pgPoolEvaluate, summaryData) => {
}))

await pgPoolEvaluate.query(`
INSERT INTO daily_measurements_summary (
INSERT INTO daily_platform_stats (
day,
accepted_measurement_count,
total_measurement_count,
Expand Down

0 comments on commit 24b28e9

Please sign in to comment.