Which columns should be key in dimension (SSAS)?

  • Which column from the attribute can I use as a key when I create a dimension in SSAS?

    I can't use "id" because it is a surrogacy key that should not be used in the dimension.

    The table is part of a DW databasemodel.

    Table Dim_Demographics:

    id

    Sex

    marital status

    yearly

    salary

  • If "id" uniquely identifies a row, it is appropriate to use it as the key. set visible to false so users of the cube don't see it.

  • Thank you for helping me.

    Another I'm wondering. If you have the surrogate key as a key column in dimension and you need to create a measurement in the cube, can I use the surrogate key despite if the key is not visible for the end user?

    // Fullmetaloby

  • If "id" uniquely identifies a row, it is appropriate to use it as the key. set visible to false so users of the cube don't see it.

    Sorry, but you always want to create an auto generated id even when you have an otherwise appropriate key. A couple of reasons: normally the business key would not be an integer, and an integer join will work faster. The other is that if you ever transition to a Type II slowly changing dimension, you will be able to do so w/o changing the key.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply