Superset Redash Metabase



Redash vs metabase

English • Russian • Spanish

Whether you are a developer, data analyst, QA engineer, DevOps person, or product manager - SQLite is a perfect tool for you. Here is why.

Metabase vs redash vs superset

Seamlessly sync all your business data to Redash and Metabase using Panoply’s built-in ETL. Set up a pipeline in minutes with our simple point-and-click interface, then we’ll handle the ongoing maintenance so you can focus on building reports, not fixing leaky plumbing. Feb 05, 2021 There are more than 10 alternatives to Metabase for various platforms. The best alternative is Apache Superset, which is both free and Open Source. Other great apps like Metabase are Redash (Paid, Open Source), Cube.js (Free, Open Source), Poli (Free, Open Source) and Bouquet (Free, Open Source).

A few well-known facts to get started:

  • SQLite is the most common DBMS in the world, shipped with all popular operating systems.
  • SQLite is serverless.
  • For developers, SQLite is embedded directly into the app.
  • For everyone else, there is a convenient database console (REPL), provided as a single file (sqlite3.exe on Windows, sqlite3 on Linux / macOS).

Console, import, and export

The console is a killer SQLite feature for data analysis: more powerful than Excel and more simple than pandas. One can import CSV data with a single command, the table is created automatically:

The console supports basic SQL features and shows query results in a nice ASCII-drawn table. Advanced SQL features are also supported, but more on that later.

Data could be exported as SQL, CSV, JSON, even Markdown and HTML. Takes just a couple of commands:

If you are more of a BI than a console person - popular data exploration tools like Metabase, Redash, and Superset all support SQLite.

Native JSON

There is nothing more convenient than SQLite for analyzing and transforming JSON. You can select data directly from a file as if it were a regular table. Or import data into the table and select from there.

Doesn’t matter how deep the JSON is - you can extract any nested object:

CTEs and set operations

Of course, SQLite supports Common Table Expressions (WITH clause) and JOINs, I won’t even give examples here. If the data is hierarchical (the table refers to itself through a column like parent_id) - WITH RECURSIVE will come in handy. Any hierarchy, no matter how deep, can be ‘unrolled’ with a single query.

Sets? No problem: UNION, INTERSECT, EXCEPT are at your service.

Calculate one column based on several others? Enter generated columns:

Generated columns can be queried in the same way as ‘normal’ ones:

Math statistics

Descriptive statistics? Easy: mean, median, percentiles, standard deviation, you name it. You’ll have to load an extension, but it’s also a single command (and a single file).

Note on extensions. SQLite is missing a lot of functions compared to other DBMSs like PostgreSQL. But they are easy to add, which is what people do - so it turns out quite a mess.

Therefore, I decided to make a consistent set of extensions, divided by domain area and compiled for major operating systems. There are few of them there yet, but more are on their way:

Superset Redash Metabase

More fun with statistics. You can plot the data distribution right in the console. Look how cute it is:

Performance

SQLite works with hundreds of millions of records just fine. Regular INSERTs show about 240K records per second on my laptop. And if you connect the CSV file as a virtual table (there is an extension for that) - inserts become 2 times faster.

There is a popular opinion among developers that SQLite is not suitable for the web, because it doesn’t support concurrent access. This is a myth. In the write-ahead log mode (available since long ago), there can be as many concurrent readers as you want. There can be only one concurrent writer, but often one is enough.

SQLite is a perfect fit for small websites and applications. sqlite.org uses SQLite as a database, not bothering with optimization (≈200 requests per page). It handles 700K visits per month and serves pages faster than 95% of websites I’ve seen.

Documents, graphs, and search

Superset Redash Metabase

Superset Redash Metabase

SQLite supports partial indexes and indexes on expressions, as ‘big’ DBMSs do. You can build indexes on generated columns and even turn SQLite into a document database. Just store raw JSON and build indexes on json_extract()-ed columns:

You can also use SQLite as a graph database. A bunch of complex WITH RECURSIVE will do the trick, or maybe you’ll prefer to add a bit of Python:

Full-text search works out of the box:

Metabase Vs Redash Vs Superset

Maybe you need an in-memory database for intermediate computations? Single line of python code:

You can even access it from multiple connections:

And so much more

There are fancy window functions (just like in PostgreSQL). UPSERT, UPDATE FROM, and generate_series(). R-Tree indexes. Regular expressions, fuzzy-search, and geo. In terms of features, SQLite can compete with any ‘big’ DBMS.

There is also great tooling around SQLite. I especially like Datasette - an open-source tool for exploring and publishing SQLite datasets. And DBeaver is an excellent open-source database IDE with the latest SQLite versions support.

I hope this article will inspire you to try SQLite. Thanks for reading!

Follow @ohmypy on Twitter to keep up with new posts 🚀