ECB
Discover European Central Bank statistical series and retrieve observations with original periods, units and source metadata
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available · $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/ecb/index.md to help me query ECB with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
Compare euro exchange rates across currencies
Example output · captured
- Connector release
- v0.2.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code
| currency | currency_name | avg_rate_per_eur | months |
|---|---|---|---|
| GBP | UK pound sterling | 0.8562 | 3 |
| JPY | Japanese yen | 161.2 | 3 |
| USD | US dollar | 1.0857 | 3 |
Quick start
Choose where to run ECB, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'ecb' AS ecb (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-ecb-worker'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'ecb' AS ecb (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-ecb:0.2.0'
);
3. Run a query
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'ecb' AS ecb
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code
Query Farm operates ECB for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use ecb as the catalog alias for the query below.
4. Run a query
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code
Technical details
- Verified connector release
- v0.2.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'ecb' AS ecb (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-ecb-worker'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'ecb' AS ecb (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-ecb:0.2.0'
);
Overview
European Central Bank statistics as SQL tables: exchange rates, interest rates, money, prices and other euro-area time series from the ECB Data Portal, with dataflow dimensions and code lists. No API key needed.
Discover European Central Bank statistical series and retrieve observations with original periods, units and source metadata. The upstream public data service needs no API key. SQL NULL arguments are rejected; missing source values become NULL. Use function arguments for source filtering; SQL WHERE filters are local. HTTP worker access can require a bearer token.
Queries use bounded HTTP responses and retries. Credentials stay out of continuation state. See README.md for deployment and operational limits.
Sources and references
Catalog
Everything ecb exposes once attached — read straight from the worker's
released build.
main 5 functions
ECB Data Portal dataflows as table functions: datasets, dimensions, code lists and observations.
Schema examples (7)
Discover ECB datasets
SELECT flow, name FROM ecb.main.datasets(flow := 'EXR') ORDER BY flow;
Discover ECB dimensions
SELECT dimension, position, codelist
FROM ecb.main.dimensions('EXR')
ORDER BY position NULLS LAST, dimension;
Discover ECB dimension codes
SELECT code, name
FROM ecb.main.codes('CL_CURRENCY')
WHERE code IN ('USD','EUR')
ORDER BY code;
Inspect ECB series
SELECT series_key, title, unit
FROM ecb.main.series('EXR', 'D.USD.EUR.SP00.A')
ORDER BY series_key;
3 more examples
Every frequency at which the US dollar/euro reference rate is published, with the frequency name decoded from the CL_FREQ code list
SELECT s.frequency, f.name AS frequency_name, s.series_key
FROM ecb.main.series('EXR', '.USD.EUR.SP00.A') AS s
JOIN ecb.main.codes('CL_FREQ') AS f ON f.code = s.frequency
ORDER BY s.series_key;
Read ECB observations
SELECT period, value, unit
FROM ecb.main.observations('EXR', 'D.USD.EUR.SP00.A', start_period := '2024-01-02', end_period := '2024-01-05')
ORDER BY period;
Average monthly ECB euro reference rates for Q1 2024 (USD, GBP, JPY), labelled with each currency's name from the CL_CURRENCY code list
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code;
| currency | currency_name | avg_rate_per_eur | months |
|---|---|---|---|
| GBP | UK pound sterling | 0.8562 | 3 |
| JPY | Japanese yen | 161.2 | 3 |
| USD | US dollar | 1.0857 | 3 |
codes (codelist VARCHAR, agency := VARCHAR, language := VARCHAR, max_rows := BIGINT, version := VARCHAR)
List values, translated labels and optional hierarchy parents from one SDMX code list. Use the agency and version returned by dimensions().
Discover ECB dimension codes
SELECT code, name
FROM ecb.main.codes('CL_CURRENCY')
WHERE code IN ('USD','EUR')
ORDER BY code;
datasets (agency := VARCHAR, flow := VARCHAR, language := VARCHAR, max_rows := BIGINT, version := VARCHAR)
List dataflows and their referenced data structures. Use flow to select one artifact; all lists available dataflows. Discovery does not retrieve observations.
Discover ECB datasets
SELECT flow, name FROM ecb.main.datasets(flow := 'EXR') ORDER BY flow;
dimensions (flow VARCHAR, agency := VARCHAR, max_rows := BIGINT, version := VARCHAR)
Return the dataflow's series-key dimensions in their declared positions plus its time dimension. Code-list references supply arguments for codes().
Discover ECB dimensions
SELECT dimension, position, codelist
FROM ecb.main.dimensions('EXR')
ORDER BY position NULLS LAST, dimension;
observations (flow VARCHAR, key VARCHAR, agency := VARCHAR, end_period := VARCHAR, first_n := BIGINT, include_history := BOOLEAN, last_n := BIGINT, max_rows := BIGINT, start_period := VARCHAR, updated_after := VARCHAR, version := VARCHAR)
Retrieve observations with original periods, values, units and SDMX attributes. include_history preserves source dataset actions and validity intervals; these are not inferred ALFRED-style vintage dates. Deletions without individual observations have a NULL period. Required positional arguments are flow and key; remaining controls are named.
Read ECB observations
SELECT period, value, unit
FROM ecb.main.observations('EXR', 'D.USD.EUR.SP00.A', start_period := '2024-01-02', end_period := '2024-01-05')
ORDER BY period;
Average monthly ECB euro reference rates for Q1 2024 (USD, GBP, JPY), labelled with each currency's name from the CL_CURRENCY code list
SELECT c.code AS currency, c.name AS currency_name,
round(avg(o.value), 4) AS avg_rate_per_eur, count(o.value) AS months
FROM ecb.main.observations('EXR', 'M.USD+GBP+JPY.EUR.SP00.A', start_period := '2024-01', end_period := '2024-03') AS o
JOIN ecb.main.codes('CL_CURRENCY') AS c ON c.code = split_part(o.series_key, '.', 2)
GROUP BY c.code, c.name
ORDER BY c.code;
| currency | currency_name | avg_rate_per_eur | months |
|---|---|---|---|
| GBP | UK pound sterling | 0.8562 | 3 |
| JPY | Japanese yen | 161.2 | 3 |
| USD | US dollar | 1.0857 | 3 |
series (flow VARCHAR, key VARCHAR, agency := VARCHAR, end_period := VARCHAR, first_n := BIGINT, include_history := BOOLEAN, last_n := BIGINT, max_rows := BIGINT, start_period := VARCHAR, updated_after := VARCHAR, version := VARCHAR)
Return matching series dimensions, titles, units and effective metadata using the source nodata mode. Required positional arguments are flow and key; all remaining controls are named arguments.
Inspect ECB series
SELECT series_key, title, unit
FROM ecb.main.series('EXR', 'D.USD.EUR.SP00.A')
ORDER BY series_key;
Every frequency at which the US dollar/euro reference rate is published, with the frequency name decoded from the CL_FREQ code list
SELECT s.frequency, f.name AS frequency_name, s.series_key
FROM ecb.main.series('EXR', '.USD.EUR.SP00.A') AS s
JOIN ecb.main.codes('CL_FREQ') AS f ON f.code = s.frequency
ORDER BY s.series_key;
Try these queries
exchange_rates_dataflow — Look up the ECB exchange-rates dataflow (EXR) from the keyless ECB Data Portal API
SELECT flow, name FROM ecb.main.datasets(flow := 'EXR') ORDER BY flow;
Uses datasets
Discover ECB dimensions
SELECT dimension, position, codelist
FROM ecb.main.dimensions('EXR')
ORDER BY position NULLS LAST, dimension
Uses dimensions
Discover ECB dimension codes
SELECT code, name
FROM ecb.main.codes('CL_CURRENCY')
WHERE code IN ('USD','EUR')
ORDER BY code
Uses codes
Inspect ECB series
SELECT series_key, title, unit
FROM ecb.main.series('EXR', 'D.USD.EUR.SP00.A')
ORDER BY series_key
Uses series
Every frequency at which the US dollar/euro reference rate is published, with the frequency name decoded from the CL_FREQ code list
SELECT s.frequency, f.name AS frequency_name, s.series_key
FROM ecb.main.series('EXR', '.USD.EUR.SP00.A') AS s
JOIN ecb.main.codes('CL_FREQ') AS f ON f.code = s.frequency
ORDER BY s.series_key
Read ECB observations
SELECT period, value, unit
FROM ecb.main.observations('EXR', 'D.USD.EUR.SP00.A', start_period := '2024-01-02', end_period := '2024-01-05')
ORDER BY period
Uses observations
ECB is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
BEA
Economy & labour
Discover BEA datasets, parameters and parameter values, then retrieve national, regional, industry and international economic accounts
BLS
Economy & labour
Retrieve labor, employment, price and productivity series with period codes, footnotes, calculations and survey metadata
Bank of England
Economy & labour
Discover Bank of England statistical series and retrieve observations with original periods, units and source metadata