Skip to content

A small project including code to retrieve notion pages with their verification information and then transform it in SQL

Notifications You must be signed in to change notification settings

faahren/notion-page-verification-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notion Page Verification Stats

A small project including code to retrieve notion pages with their verification information and then transform it in SQL

How to install

  • Install dependencies
  • Create your env file: cp .env_template .env
  • Add your API key and BQ information to your newly created env file. Don't use an existing table as the script will overwrite it.
  • Start with yarn start (or npm start)...

What will hapen

The script will retrieve data from Notion and insert pages in the bigquery table that you defined in your env file.

Why is the exported format so tedious in BigQuery ?

This code was generated to mimic the Airbyte extraction format for educational purpose. I would always advise using tools like Airbyte in production instead of maintaning your own APIs

Run the query to transform the data

  • Take the file in scheduled_query/pages.bqsql
  • Replace the table id in line 11 (The only thing you need to change is this table id in the first CTE)
  • Run it in BigQuery to make sure you have your results
  • Schedule it

About

A small project including code to retrieve notion pages with their verification information and then transform it in SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published