Datatype
Hi,
I found two different information about the data type we can use for the schema:
1) One is coming from https://developer.domo.com/docs/dataset-api-reference/dataset#Create%20a%20DataSet and says we have these types: STRING, DECIMAL, LONG, DOUBLE, DATE, and DATETIME
2) The other one is coming from https://knowledge.domo.com/Prepare/Magic_Transforms/DataFusion/01Combining_DataSets_Using_DataFusion and says we have these types: LONG, DOUBLE, STRING, DATETIME, DATE and TIME
The common types are: STRING, LONG, DOUBLE and DATETIME
The differences are: DECIMAL and TIME
Which one is the correct set of types?
Also what is the difference between DECIMAL and DOUBLE and LONG?
In what I read:
- DOUBLE: it's for floating numbers
- LONG: it should be used for integers
- DECIMAL: the same as DOUBLE?
If I have a column that stores currency numbers, should I use DOUBLE or DECIMAL?
Thanks
Comments
-
Source: https://knowledge.domo.com/Prepare/Magic_Transforms/DataFusion/01Combining_DataSets_Using_DataFusion
- LONG stores numbers as numeric values, including decimal, fractional, and whole numbers.
- DOUBLE stores double-precision floating point number values.
- STRING stores alphanumeric characters as text.
- DATETIME stores year, month, day, hour, minute, and second values.
- DATE stores year, month, and day values.
- TIME stores hour, minute, and second values.
- DOUBLE stores decimal values with a higher precision (24-53 digits) than a FLOAT type. LONG is used when a wider range than INT is needed.
What I'm not sure is why the SDK's don't have the same data types listed because you're right, it has DECIMAL as an option. Try running a test, if you store it as a DECIMAL does it come out the same as a DOUBLE?
**Make sure to like any users posts that helped you and accept the ones who solved your issue.**0 -
Thanks for your reply.
I decided to use "DOUBLE" because it seems safer. I was just curious about the inconsistency between the documentation...
0 -
I'm pretty sure Magic ETL doesn't have TIME as a data type, though it may have been a recent enhancement. I'd be surprised if it were in Fusion if it's not in ETL, but perhaps...forgive my not checking, but I'm Dojoing on my phone.
On the number formats...I think we are all confused. Lol. I think I typically use Decimal or Whole Number, depending on the type of info, and leave the rest of the types. I'm pretty sure it makes it 2 decimal places. This reduces the amount of tinkering you have to do in the visualizations. Of course the argument can be made for enabling users to go out more decimal places, but for currency, you seldom require that.
DataMaven
Breaking Down Silos - Building Bridges
**Say "Thanks" by clicking a reaction in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive