DuckDB + Webassembly = WhatTheDuck
Written by Nikos Vaggalis   
Thursday, 02 January 2025

Run DuckDB inside your browser thanks to Webassembly. When is that useful?

Running a database instance inside a browser is nothing new.
I've already explored the idea in Running PostgreSQL Inside Your Browser With PGLite where I explained:

PGlite is a WASM Postgres build packaged into a TypeScript client library that enableyou to run Postgres in the browser with no need to install any other dependencies.

The concept here is the same. You get a local first application
disposable application without the hassle of having to set up anything.

Usually when I want to quickly load CSV files, store them in tables and perform SQL queries on the data, I use DBeaver where I setup the DuckDB driver as well the in-memory database and then load the CSV with "create table as".

Instead, with WhatTheDuck you just upload your files and are ready to go.

duck

Furthermore you can:

  • Upload multiple csv files to run sql queries
  • Smart editor to write SQL queries
  • Run SQL queries to analyze data
  • Download the query result in csv format
  • For Bar Chart on X axis select a column with string values and on Y axis select a column with numeric values
  • For Scatter Chart on X axis select a column with numeric values and on Y axis select a column with numeric values

The important point here is that no data ever leaves your browser. The rest of the benefits of using WhatTheDuck is that it is fast and efficient, perfect for quick data analysis.

WhatTheDuck is accessible as a playground from everywhere and everyone with just an internet connection, but in case you want to run it totally locally on your own machine ,you can do so since it is open source hence it can be downloaded from its Github repo to built from source or as a docker image.

Personally, having now experienced the ease of use of running DuckDB for quick data analytics inside the browser, taking into consideration the preservation of privacy as well, I'll never look back at running a local setup.

duckdblogo

More Information

WhatTheDuck Playground
WhatTheDuck Github

Related Articles

Running PostgreSQL Inside Your Browser With PGLite 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Azure RAGChat Deep Dive
18/03/2025

Azure RAGChat is a very popular application developed by Microsoft and made available for free for creating ChatGPT-like experiences with your own data.



State of Rust Survey 2024 Results
19/02/2025

The Rust Foundation conducted its annual survey between December 5th and 23rd, 2024. As in previous years, it was focused on gathering insights and feedback from Rust users which are now presente [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 02 January 2025 )