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.

    Source: https://dojo.domo.com/t5/Workbench/What-the-difference-between-double-and-long-data-types/m-p/15890/highlight/true#M375

    • 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.**
  • Thanks for your reply.

     

    I decided to use "DOUBLE" because it seems safer. I was just curious about the inconsistency between the documentation... 

     

  • 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"
This discussion has been closed.