Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Managing GUID columns in a PBI data model

Hi,

in order to rationalize the columns for the tables of a PBI data model, how is better managing GUID columns?

For fact tables it's good to avoid to have these key columns in the model, but for dimension tables?

Thanks

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous,

     

    Actually, M query has it owner guid function. If you not want to use original guid who stored in your database, you can try to create temporary guid by above function.

    Text.NewGuid

     

    Notice: Lazy evaluation will effect above method to generate guid(same guid), if you can please use above function in table to instead list.

     

    Lazy and eager evaluation

    List, Record, and Table member expressions, as well as let expressions (See Expressions, values, and let expression), are evaluated using lazy evaluation: they are evaluated when needed. All other expressions are evaluated using eager evaluation: they are evaluated immediately, when encountered during the evaluation process. A good way to think about this is to remember that evaluating a list or record expression will return a list or record value that knows how its list items or record fields need to computed, when requested (by lookup or index operators).

     

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      I'm searching the best practice to manage GUID columns read from a data source in order to reduce the occupied space in memory.

      Think about a GUID column with more and more distinct values.

      Thanks

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Anonymous,

         

        Current I haven't found any effective solution to cutdown the cost of guid.

         

        Maybe you can try to use identity column to achieve unique id.

         

        Regards,

        Xiaoxin Sheng