Solved

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

Posted on 2013-01-01
2
418 Views
Last Modified: 2016-02-18
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
Comment
Question by:rodqxo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Kash earned 500 total points
ID: 38736138
this example may point you to the right direction >> http://technet.microsoft.com/en-us/library/cc280466%28v=sql.100%29.aspx
0
 

Author Comment

by:rodqxo
ID: 38749411
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question