Skip to content

Commit

Permalink
📜 update docs for make refresh.pageviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Jan 10, 2024
1 parent c7cfc03 commit cd74480
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/refreshPageviewsFromDatasette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import Papa from "papaparse"
import * as db from "./db.js"

async function downloadAndInsertCSV(): Promise<void> {
// Fetch CSV from private Datasette and insert it to a local MySQL. This function
// exists because `make refresh` uses MySQL dump that excludes analytics_pageviews
// table. That's why it's necessary to call `make refresh.pageviews` separately.
const csvUrl =
"http://datasette-private/owid/analytics_pageviews.csv?_size=max"
const response = await fetch(csvUrl)
Expand Down

0 comments on commit cd74480

Please sign in to comment.