division | title | date | notes | bunting |
---|---|---|---|---|
england-and-wales | New Year’s Day | 2018-01-01 | true | |
england-and-wales | Good Friday | 2018-03-30 | false | |
england-and-wales | Easter Monday | 2018-04-02 | true | |
england-and-wales | Early May bank holiday | 2018-05-07 | true | |
england-and-wales | Spring bank holiday | 2018-05-28 | true | |
england-and-wales | Summer bank holiday | 2018-08-27 | true | |
england-and-wales | Christmas Day | 2018-12-25 | true | |
england-and-wales | Boxing Day | 2018-12-26 | true |
Last active
May 9, 2024 06:18
-
-
Save Bilbottom/5c1399fc160f7b427556a36c7b9888d3 to your computer and use it in GitHub Desktop.
DuckDB for dynamically parsing JSON data from a URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DuckDB for dynamically parsing JSON data from a URL | |
DuckDB version: 0.10.2 | |
Bill Wallis, 2024-05-09 | |
*/ | |
select version(); | |
select | |
division, | |
unnest(events.events, recursive:=true), | |
from ( | |
unpivot 'https://www.gov.uk/bank-holidays.json' | |
on "england-and-wales", "scotland", "northern-ireland" | |
into | |
name division | |
value events | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is part of the following LinkedIn post:
https://www.linkedin.com/posts/bill-wallis_sql-duckdb-activity-7183788325726507009-4Dcf
...and features in the DuckDB snippets:
https://duckdbsnippets.com/snippets/172/uk-bank-holidays