Tuesday, November 24, 2026SubscribeMastheadAbout
Cali ReporterCalifornia · National · West Coast · Good News

Advertisement

Technology

OLAP Solution Built with DuckDB-Wasm in the Browser

A developer created an OLAP solution using DuckDB-Wasm, allowing analytical queries to run in the browser without requiring a database server or external hosting services.

Portrait of Benjamin Boyce
Artificial Intelligence & Technology · November 21, 2026
Share

AI-generated editorial illustration from an imagined camera angle.
AI-generated editorial illustration from an imagined camera angle. Source image: dev.to.

The project, known as Retail OLAP Lab, is an application that executes analytical queries with DuckDB-Wasm within the browser and can be automatically published using GitHub Actions and GitHub Pages (Dev.to, 2024). It uses 100,000 synthetic sales records that are reproducible and do not contain personal information. The solution does not require any configuration or an AWS account, and the hosting provider serves the public files, while the query engine runs on the visitor's device. The main measure used in this OLAP solution is revenue, calculated as quantity multiplied by unit price, and the dimensions include date, market, and category (Dev.to, 2024). [1]

The architecture of the solution involves a public repository that is pushed to the main branch, which triggers GitHub Actions for validation, packaging, and deployment to GitHub Pages. The deployed application includes HTML, CSS, JavaScript, and a model.sql file. The DuckDB-Wasm engine is downloaded from jsDelivr with an explicit version of the package. Each browser creates its own in-memory database, and there is no shared database between visitors (Dev.to, 2024). [1]

The project uses a small and verifiable star schema, with the fact_sales table containing a record for each sales line. It includes an identifier, date, region and product keys, quantity, and unit price. The dimension tables include dates from January 2024 to December 2025, regions such as Peru, Chile, Colombia, Mexico, and Argentina, and product categories such as Electronics, Home, Sports, and Books (Dev.to, 2024). The sales view joins these tables and calculates revenue as a decimal type. All amounts are expressed in USD as a common unit in the example, and no currency conversion is performed. [1]

The application includes OLAP operations such as slicing and dicing, drilling down, roll-up, and pivoting. These operations allow users to filter the dataset by market and year, drill down into specific months, roll up to view totals by market, and pivot to compare categories between years (Dev.to, 2024). The application also includes validation before publishing, which ensures that the model is correct and that the total revenue is consistent across different aggregations. The validation process is automated and produces a JSON file with the results of the validation (Dev.to, 2024). [1]

Advertisement

The Retail OLAP Lab application is automatically published using GitHub Actions and GitHub Pages (Dev.to, 2024). When changes are pushed to the main branch of the public repository, GitHub Actions triggers a workflow that validates the model, checks the JavaScript syntax, and ensures the application functions correctly. This validation process includes running a Python script, test_model.py, which verifies the model's granularity, unique identifiers, calendar coverage, and join accuracy. The script also calculates revenue independently using integers in cents and compares it with the decimal sum from SQL to ensure consistency. The results of these tests are saved in evidence/validation.json, providing a verifiable record of the model's correctness. [1]

The deployment workflow, defined in .github/workflows/pages.yml, is activated upon pushing changes to the main branch (Dev.to, 2024). It installs DuckDB for testing, validates the model and JavaScript syntax, and ensures that the application's logic aligns with the expected outcomes. Only after the validation process is successfully completed does the workflow proceed to deploy the application to GitHub Pages. The deployment job depends on the successful outcome of the validation step, ensuring that any failed assertions prevent the new version from being published. This workflow requires the repository to be public and the Pages source to be configured in GitHub Actions, with a temporary token used to avoid storing external provider credentials. [1]

The application itself is designed to be reproducible and self-contained, using synthetic data generated through SQL operations on generate_series(1,100000) (Dev.to, 2024). This synthetic data allows for consistent results upon reloading the application and facilitates testing and validation. The deployment process ensures that only the dist/ directory is published, limiting the exposure of internal files and maintaining security. The project's validation and deployment workflow ensures that the application is only made publicly available after passing all necessary checks, reinforcing the reliability and correctness of the deployed solution. [1]

The Retail OLAP Lab application is automatically published using GitHub Actions and GitHub Pages, as described in the Dev.to article (2024). The deployment workflow, defined in the .github/workflows/pages.yml file, is activated upon pushing changes to the main branch (Dev.to, 2024). This workflow ensures that the application is consistently updated and deployed without manual intervention, maintaining the integrity of the project's code and functionality. [1]

Advertisement

The application is designed to be reproducible and self-contained, using synthetic data generated through SQL operations on generate_series(1,100000) (Dev.to, 2024). This synthetic data allows for consistent testing and verification of the application's performance and accuracy. The deployment workflow includes validation steps to ensure that the application functions correctly before it is published to GitHub Pages. [1]

The workflow defined in .github/workflows/pages.yml includes steps to install DuckDB for validation, check the JavaScript syntax, and ensure the application's components are correctly assembled (Dev.to, 2024). The job of deployment depends on the successful completion of the validation steps. If any assertion fails, the new version is not published, ensuring that only verified and functional versions of the application are made available to users. [1]

Sources

Dev.to

Prepared with AI assistance from the cited sources.

The Cali Reporter newsletter

The stories worth your time.

California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.

By joining, you agree to receive the Cali Reporter newsletter. Unsubscribe at any time. Privacy policy.

More in Technology

  • Modern Web Guidance 1.0 and Browser Compatibility

    Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…

  • Apache mod_http2 Vulnerability Detection with Nmap

    A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.

  • Securing Remote Vendor Access in Industrial Networks

    Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.

Advertisement