Skip to content

ael-computas/bigquery-holidays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bigquery-holidays

Python code to generate holidays to put in BigQuery.

This code was written as a part of medium article: https://medium.com/@ael-computas/bigquery-and-holidays-2b26cfb315a6

This program generates holidays from 1900 - 2050 and stores it in GCSas PARQUET files (one for each year). You will have to load into BigQuery yourself.

bq --location=EU load --source_format=PARQUET --replace holidays.holidays gs://the-bucket/path/*

Installation

pip install -r requirements.txt

Usage

Edit the main.py and change BASE_PATH to either a local filesystem or your own gcs bucket.

If you want to store in S3 or similar you can do that, but then you would need to update requirements.txt first and change the smart_open dependencies.

BigQuery

Feel free use ael-cx.holidays.holidays as a source for your own holidays table in BigQuery (until google adds its own CANON dataset).

About

Python code to generate PARQUET files for holidays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages