Headless BI: Metric Standardization in Action
See how various data tools access a headless BI platform to consume the same metrics and achieve consistent results, eliminating metric drift across teams.
What is Headless BI?
Headless BI separates analytical backends and computing from consumption. This approach exposes a universal semantic layer to multiple data tools through APIs and standard protocols.
All data consumers gain access to a single metrics source, enabling data engineers, analysts, and end-users to work with consistent metrics using their preferred tools.
Setting Up the Headless BI Platform
GoodData.CN CE
To implement this concept, download the GoodData Python SDK containing a docker-compose file. Run:
$ docker-compose up -d
This command starts both GoodData.CN Community Edition and GoodData FDW containers, loading predefined analytical objects including data connectors, semantic models, metrics, visualizations, and dashboards.
Access the platform at http://localhost:3000/ with credentials:
- User: [email protected]
- Password: demo123
The Demo workspace includes a logical data model with a Revenue metric that filters orders by delivery status, excluding returned and canceled orders.
GoodData Foreign Data Wrapper
GoodData FDW is a PostgreSQL extension making GoodData.CN’s metrics and calculations available as tables.
Connect using:
- Console:
psql --host localhost --port 2543 --user gooddata gooddata123 - JDBC:
jdbc:postgresql://localhost:2543/gooddata
Define the GoodData.CN server in PostgreSQL, then import the semantic model into a special compute pseudo-table. Selecting from this table triggers analytics computation based on specified columns.
Consuming Standardized Revenue Metrics
SQL Clients
Connect DBeaver to GoodData FDW using PostgreSQL connection details. Execute:
select customers_region, revenue from demo.compute;
This produces identical Revenue by Region results as the GoodData.CN platform.
Data Science IDEs
Start Jupyter with $ jupyter notebook, then use ipython-sql to connect to FDW and execute the same SQL query, printing results directly.
BI Platforms
Run Metabase as a Docker container, create a network connecting it to FDW, and configure the database connection. The same SQL query produces consistent results.
React Applications
Use GoodData.UI to create a React application. After configuring constants and exporting authentication tokens, generate human-readable JavaScript identifiers for data model objects using yarn refresh-md.
Edit the Home.js file to create a Revenue by Region table component displaying embedded results.
Comparing Results
All tools — SQL clients, Jupyter, Metabase, and React applications — accessed the same semantic model, consumed identical metrics, and produced exactly matching results.
Summary
Metric standardization enables defining all metrics in one location for consumption by different data tools. Headless BI achieves this by decoupling analytical backends from consumption layers and exposing semantic layers via APIs and standard protocols, ensuring consistent metrics across organizational tools.