Precision Loss Redshift Data Flow
I am encountering a weird behaviour on using SQL SUM method on decimal values with DOMO Data Flow.
Expected result based on query from MySql:
Result in DOMO after Redshift Data Flow completes:
Issue is that precision is lost in this case and final result will be different in doing SUM on this values:
MySql => 100
DOMO => 99.99.
What can I do in this case to fix that part and to obtain same result as MySql?
Comments
-
Hi @user037867
You could utilize a ROUND(number, <decimal places>) function in a mysql dataflow to force it to do the rounding to the precision you want instead of having to truncate your numbers on input. If the percentage is calculated in your initial query you can use ROUND there instead of a MySQL data flow as well.
The other option if you must use magic ETL would be to use a calculator tile to multiply your percentage by 100 (shifting the decimal point over 2, use 1000 for 3 decimals of precision etc), set the data type to be a whole number (forces rounding) -> set the data type back to decimal -> calculator to divide by your original number (100 / 1000 etc).
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
if possible, i would recommend against intentionally rounding metrics in ETL, keep the data as raw/accurate as possible.
Also, try downloading a sample of your data, the UI sometimes hides the precision of the data.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
If you are using Redshift, I was able to fix this using "::decimal(16,8)" the first number is the precision and the second one is the scale or how many numbers right of the decimal.
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 708 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive