Skip to content
DuckDB community extension

eurostat

Extension that adds support for reading data from EUROSTAT database using SQL.

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 Β· SQL
INSTALL eurostat FROM community;
LOAD eurostat FROM community;

Try it in a temporary SQL session with eurostat already loaded. Queries run in this tab; examples using files or services need their own setup.

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

SQL session and output
SELECT * FROM EUROSTAT_DataStructure('ESTAT', 'DEMO_R_D2JAN', language := 'en');

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ provider_id β”‚ dataflow_id  β”‚ position β”‚  dimension  β”‚             concept             β”‚
β”‚   varchar   β”‚   varchar    β”‚  int32   β”‚   varchar   β”‚             varchar             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        1 β”‚ freq        β”‚ Time frequency                  β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        2 β”‚ unit        β”‚ Unit of measure                 β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        3 β”‚ sex         β”‚ Sex                             β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        4 β”‚ age         β”‚ Age class                       β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        5 β”‚ geo         β”‚ Geopolitical entity (reporting) β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚       -1 β”‚ geo_level   β”‚ NUTS classification level       β”‚
β”‚ ESTAT       β”‚ DEMO_R_D2JAN β”‚        6 β”‚ time_period β”‚ Time                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

SELECT * FROM EUROSTAT_Read('ESTAT', 'DEMO_R_D2JAN') LIMIT 5;

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  freq   β”‚  unit   β”‚   sex   β”‚   age   β”‚   geo   β”‚ geo_level β”‚ TIME_PERIOD β”‚ observation_value β”‚
β”‚ varchar β”‚ varchar β”‚ varchar β”‚ varchar β”‚ varchar β”‚  varchar  β”‚   varchar   β”‚      double       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ A       β”‚ NR      β”‚ F       β”‚ TOTAL   β”‚ AL      β”‚ country   β”‚ 2000        β”‚         1526762.0 β”‚
β”‚ A       β”‚ NR      β”‚ F       β”‚ TOTAL   β”‚ AL      β”‚ country   β”‚ 2001        β”‚         1535822.0 β”‚
β”‚ A       β”‚ NR      β”‚ F       β”‚ TOTAL   β”‚ AL      β”‚ country   β”‚ 2002        β”‚         1532563.0 β”‚
β”‚ A       β”‚ NR      β”‚ F       β”‚ TOTAL   β”‚ AL      β”‚ country   β”‚ 2003        β”‚         1526180.0 β”‚
β”‚ A       β”‚ NR      β”‚ F       β”‚ TOTAL   β”‚ AL      β”‚ country   β”‚ 2004        β”‚         1520481.0 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Provided by ahuarte47. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

This is an extension for DuckDB for reading data from EUROSTAT database using SQL.

Eurostat is the official statistical office of the European Union, responsible for providing high-quality, comparable, and harmonised statistics on Europe’s economy, society, environment, and more.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
ahuarte47/duckdb-eurostat
License
MIT
Maintainers
ahuarte47
Written in
C++
Build source
34da5469c503
Build definition
Community descriptor