april 01, 2023
Configuring number formats in Apache Superset
Not so long ago our company started to master the new Apache technology stack. And now, after several successful projects, we wanted to share.
It is no secret that the role of dashboards in modern analytical systems is quite high. The user of any interactive product wants a fast and functional tool. Customer requirements in this regard are not limited to these criteria and are often supplemented by formatting constraints.
Here we have faced the problem of number visualization when using Apache Superset, which itself is a rather powerful open-source software for creating BI tools. Unfortunately, Superset has few degrees of freedom in formatting, for example, to output the numbers in the standard solution there are only two options: comma-separated or unseparated. The customer usually requires a space as a thousandth’s separator.
We found a way to solve this problem by editing the source code of our Apache Superset (version 1.5.1) deployment instance. We suggest you read the instructions:
1. In the superset installation directory, go to the superset/static/assets folder
2. Start a pattern search where the separator is spelled out:
grep -rl ‘thousands:»,»
The output is a list of two or three files as shown in the figure:our development experience and some features.
In our case, the file paths look like this:
/app/superset/static/assets/21151c26622dbe000474.chunk.js
/app/superset/static/assets/vendors.26ca060a3fdda9d4f1bb.entry.js
3. open the files with any editor and change
thousands:»,» to thousands:» «
4. Press CTRL-F5 in the browser to display the changes