Forum Discussion

jjkmd's avatar
jjkmd
Icon for Helper I rankHelper I
7 years ago
Solved

quick question on Data Types to use for Account ID's that are numbers

New to data modeling - I did try to search this but it's such as simple question I couldn't find a post.  

 

My data has Patient Name (Text), but also "Medical Record Number"  "Account Number" "Transaction ID" "CPT Code" "Modifier" etc.

 

All those are strings of numbers from 2 to 12 digits long.  I can't imagine needing to sum() min() max() these numbers - they basically serve as identification digits, not a number I would want to perform calculations on.  They are digits I'll want to aggregate and filter on though.

 

Are there best practices on how to handle these?  Keep them as numbers because there is some background DB optimization reason to do so?  Convert them to Text because thats technically how they are used and this avoids other issues? 

 

Same for things like Zip code?

  • Hi jjkmd 

     

    The simple answer is, everything that you are not performing any aggregations on can be set as data type text, it will make your life easier when you are bringing any of this column to your visual, by grouping them rather then agregating as default behaviour, performance or size of the model is not affected, as it would be in different types of DB's like SQL for example.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski

     

1 Reply

  • Mariusz's avatar
    Mariusz
    Icon for Community Champion rankCommunity Champion

    Hi jjkmd 

     

    The simple answer is, everything that you are not performing any aggregations on can be set as data type text, it will make your life easier when you are bringing any of this column to your visual, by grouping them rather then agregating as default behaviour, performance or size of the model is not affected, as it would be in different types of DB's like SQL for example.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski