Link to home
Create AccountLog in
Avatar of rodqxo
rodqxo

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of Kash
Kash
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of rodqxo
rodqxo

ASKER

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.