数据可视化的开源方案: Superset vs Redash vs Metabase (二) 叶剑烨 1 个月前 在上篇结尾处我提到“如果现在让我重新选择,我会使用哪个可视化工具?”我的答案是 Redash,原因主要不是功能层面,而是技术层面。.
Metabase Vs Redash Vs Superset
English • Russian • Spanish
- Metabase vs Redash vs Superset What are the differences? Metabase - An open-source business intelligence tool. Redash - Easily query an existing database, share the dataset and visualize it in different ways. Superset - Data exploration and visualization.
- A Single Source of Truth for Metabase and Apache Superset Power consistent reporting and analysis with Panoply. Sync and store data from over 30+ sources. Keep all your business units happy by connecting their favorite BI tools.
- Redash 的代码结构也很干净,可以排第二,Superset 稍略一筹排在末位。这个结果与定量分析的结论是基本一致。 小结. 本文以 Superset,Redash,Metabase 三个项目的比较为例,介绍了开源项目选择上的一些原则。.
Whether you are a developer, data analyst, QA engineer, DevOps person, or product manager - SQLite is a perfect tool for you. Here is why.
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 JOIN
s, 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. Jones sewing machine serial number lookup. There are few of them there yet, but more are on their way:
Superset Redash
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 INSERT
s 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
Metabase Vs Superset
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:
Superset Redash Metabase
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:
Maybe you need an in-memory database for intermediate computations? Single line of python code: Tavannes watch co serial numbers.
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 🚀