ETL Actions: Edit Columns: Set Column Type
As stated in the knowledge base (https://knowledge.domo.com/Prepare/Magic_Transforms/ETL_DataFlows/02ETL_Actions%3A_Edit_Columns), the definition for the Data Type "Decimal (Fixed)" reads as follows: "Contains decimal numbers with a fixed number of digits after the decimal point".
The definition does little to clarify the data type. I am left with a large array of questions, and I can't find further documentation. Below is a short list of key items:
1. What is the precision of this data type? (Two decimal places? Three? Five? Perhaps the max precision of all decimals in the column?)
2. Is the decimal truncated or rounded?
2a. If rounded, what method of rounding is used?
Thank you.
Best Answer
-
Hiya,
The first screenshot shows the data in raw form entered into a webform.
Column 1 is deliberately set to have an insane amount of decimals.
Column 4 is set to show the rounding behavior based on the data type.
In magic ETL, I converted each column into Whole, Fixed, Decimal.
Then in Analyser, I set the column to a number and the max decimal places I can set is 6.
You can observe the rounding behavior from the screenshot, or if you wish, perform the same exercise using different numbers to answer your questions ?
Hope that helps !
0
Answers
-
Hiya,
The first screenshot shows the data in raw form entered into a webform.
Column 1 is deliberately set to have an insane amount of decimals.
Column 4 is set to show the rounding behavior based on the data type.
In magic ETL, I converted each column into Whole, Fixed, Decimal.
Then in Analyser, I set the column to a number and the max decimal places I can set is 6.
You can observe the rounding behavior from the screenshot, or if you wish, perform the same exercise using different numbers to answer your questions ?
Hope that helps !
0 -
So decimal fixed appears to go to 5 places and rounds up. Thank you for running this test. Is there a method to truncate or round to 2 decimal places in ETL?
0 -
I often use the SQL to do my ETL work as I get more flexibility ?
Original data in Column 4 has 2decimal places. So rounding it to 2 decimal places has no effect.
Column 5 has 3 dp. As you can see below. using a round() and truncate() changes the number.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive