• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

How could the Key column be included in a DMX query?

How could the Key column be included in a DMX query under the Mining Model Prediction tab?

The model used, say DT (for Decision Trees), can list every input and/or predict column except for the Key column.

Is there a way or work-around to include this Key column?
0
rodqxo
Asked:
rodqxo
1 Solution
 
Kash2nd Line EngineerCommented:
this example may point you to the right direction >> http://technet.microsoft.com/en-us/library/cc280466%28v=sql.100%29.aspx
0
 
rodqxoAuthor Commented:
On BIDS/VS2008, I tried StructureColumn(‘KeyColumnName') but I get this error:
"The STRUCTURECOLUMN function cannot be used in the context ..."

Here's the DMX query I used:
SELECT StructureColumn('KeyColumn') From [AR]; where [AR] is an Association model.

I defined KeyColumn as a Key; as opposed to Input, Input+Predict, Predict only.

The [AR] model seems to be only aware of the Input and Predict columns. It is blind to the Key type column, i.e., KeyColumn.

Later on ...

Ok, got it. I should use it this way:
SELECT StructureColumn('KeyColumn') From [AR].CASES

But for now it does not work with a PREDICTION JOIN statement.

Thanks.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now