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
- 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