Redash: Format Integers with commas

Created on 13 Jul 2017  路  7Comments  路  Source: getredash/redash

Hello,

Our users complains about the integers are shown with comma.

Example

SELECT id FROM test;

Where id is INT(11) unsigned

Result is 21,668

Do you know if we can fix it quickly?

Thanks

Max.

Most helpful comment

Maybe a little late but I ran into the same issue and solved it by casting the id-column to char.
In your case: SELECT CAST(id as CHAR(8)) as id FROM test;
Hacky "but it works" ;)

All 7 comments

Maybe a little late but I ran into the same issue and solved it by casting the id-column to char.
In your case: SELECT CAST(id as CHAR(8)) as id FROM test;
Hacky "but it works" ;)

V4 includes the ability to configure how each column is rendered, so you can control whether you want the commas in integers or not.

@arikfr how to configure how each column is rendered

Currently we are using V5 but I cant seem to find the parameter to check rendering.
Could you please point me to the right direction.

Bump. Where do we configure this?

Its actually in the organization table in the database. You will have to edit that table entry. Redash stores this setting on startup.

For fresh installs only -->
There are two env variables which can be set -

REDASH_INTEGER_FORMAT="00"
REDASH_FLOAT_FORMAT="00.00"

This will remove the commas in the formatter.

Maybe a little late but I ran into the same issue and solved it by casting the id-column to char.
In your case: SELECT CAST(id as CHAR(8)) as id FROM test;
Hacky "but it works" ;)

this solves my problem.. thx!

Was this page helpful?
0 / 5 - 0 ratings