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


Windows 11 Adoption Takes A Downturn
11/12/2024

With Windows 10 End of Life only ten months away, Microsoft is stepping up its campaign to get Windows users to upgrade to Windows 11. But while Windows 11 had been gaining users at a steady rate at t [ ... ]



Microsoft Releases Update For VSCode SQL Extension
30/12/2024

There's a new version of the Microsoft MSSQL extension for Visual Studio Code that aims to make it easier to write VSCode apps for database use, specifically for Azure SQL, SQL Database in Fabric, and [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Thursday, 02 January 2025 )