Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redash is rounding numeric/float results to two decimal places? #622

Closed
astewart-twist opened this issue Oct 21, 2015 · 6 comments
Closed
Labels

Comments

@astewart-twist
Copy link

I think redash is forcing floats/numerics in query results to two decimal places? The following example should be returning division results to 10 decimal places.

https://demo.redash.io/queries/659/source

Is there a way to override this?

@arikfr
Copy link
Member

arikfr commented Oct 22, 2015

Unfortunately there is no way. I'm hoping to add options for the table visualization, that will allow overriding this and some other options. But that currently only in the planning phase.

@astewart-twist
Copy link
Author

Glad to know I'm not going crazy on the SQL side at least :) Could you point me to where in the code that rounding is happening? I may try to patch a copy for myself. That or just use percentages.

@arikfr
Copy link
Member

arikfr commented Oct 22, 2015

@jvyduna
Copy link

jvyduna commented Apr 19, 2016

We use a temporary hack for this - casting to string. For MySQL:

2 decimals shown:
SELECT ROUND(1/9,10);

10 decimals shown:
SELECT CAST(ROUND(1/9,10) AS CHAR);

@arikfr
Copy link
Member

arikfr commented Apr 20, 2016

@arikfr arikfr added this to the v0.10.1 milestone Apr 20, 2016
@arikfr arikfr modified the milestones: v0.11.0, v0.12.0 Jun 14, 2016
@arikfr arikfr modified the milestone: v0.12.0 Oct 9, 2016
@arikfr
Copy link
Member

arikfr commented Oct 21, 2016

Closing in favor of #1356.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants