none
Can we define multiple key columns for a mining structure?

    Question

  • Hi, all,

    Just found that we are not able to define multiple key columns for a mining structure in SQL Server 2005 Data Mining engine, just wondering is there other way to define multiple key columns for a mining structure there? As in many cases, the table we are mining are with composite key consisting of different foriengn keys, e.g.  A fact table are with transaction information and other foreign keys. If I am not able to define these composite key here for this fact table, I will have to have a named calculation in data source view to have a key column which is based on these original composite keys? Is this a better way to solve this problem or there is any other alternatives to figure it out?

    Hope my question is clear for your help and I am looking forward to heaing from you shortly for your kind advices and help and thanks a lot in advance.

    With best regards,

     Yours sincerely,

     

     

    Tuesday, July 10, 2007 11:07 AM

Answers

  • Multiple key columns are not permitted in a mining structure. However, you can specify multiple bindings for the Key column in the mining structure: in the Mining Structure tab in BI Dev Studio, click on KeyColumns in the Properties pane and then click on the "..." button in the value field to bring up an editor that allows you add additional bindings. You will also need to specify a NameColumn binding (the next field in Properties) that binds to a source that contains unique names for the composite key you've specified via the multiple bindings under KeyColumns.

     

    The option you suggest (adding a named calculation in the DSV) will also work.

    Wednesday, July 11, 2007 1:21 AM
    Moderator

All replies

  • Multiple key columns are not permitted in a mining structure. However, you can specify multiple bindings for the Key column in the mining structure: in the Mining Structure tab in BI Dev Studio, click on KeyColumns in the Properties pane and then click on the "..." button in the value field to bring up an editor that allows you add additional bindings. You will also need to specify a NameColumn binding (the next field in Properties) that binds to a source that contains unique names for the composite key you've specified via the multiple bindings under KeyColumns.

     

    The option you suggest (adding a named calculation in the DSV) will also work.

    Wednesday, July 11, 2007 1:21 AM
    Moderator
  • Hi, Raman,

    Thanks for your advices.

    But still we need a name column whenever we have a muitiple columns bindings for the key attribute?

    With best regards,

    Yours sincerely,

     

    Wednesday, July 11, 2007 9:43 AM
  • Yes, that's correct - otherwise the server does not know what to name the composite key value (it can't do a simple concatenation because of type differences).
    Friday, July 13, 2007 7:37 PM
    Moderator
  • Hi, Raman,

     

    Thanks.

     

    Best regards,

     

    Yours sincerely,

     

     

    Monday, July 16, 2007 9:44 AM
  • Hello,

    I was able to define multiple key columns for a mining structure while working on a Time Series model.

    My input table had YearIndex, Region, Count & few more fields. I had chosen YearIndex and Region to be key columns.  I got the same error when YearIndex and Region were varchar.

    I converted YearIndex to an int and was able to create and process the mining structure.

    Hope this helps.


    • Edited by Renu Sidgal Wednesday, August 21, 2013 3:39 PM typo
    Wednesday, August 21, 2013 3:38 PM