I've tried those two operations in the Management Studio.
Though we can create a mining structure and mining model in Management Studion,
but we cannot process the analysis-service database.
(1) I create only a mining structure through CREATE MINING STRUCTURE.
No error reported. But if I process the analysis-service database in Management Studio I always get error
'Error : The '<mining_structure__name>' structure does not contain bindings to data
(or contain bindings that are not valid) and cannot be processed.
I then tried to create it by creating and running an XMLA script. It was successful.
However, it's much harder to learn XMLA.
If any of you created an analysis-service database in Mgt Studio, and create a mining
structure in the same place using DMX script, can you process the database?
(2) Is there any use of CREATE MINING STRUCTURE operation without binding
to any table? Examples I saw so far did not show relating it to do. In my experience
processing the analysis-service database with that mining structure is doomed to fail.
(3) Is there any way we can create mining structure through CREATE MINING
STRUCTURE operation in Management Studio and use RELATED TO clause
to bind it to any Relationship to an attribute column (mandatory only if it applies), indicated by
the RELATED TO clause
(4) If this is the fact, is there any use of CREATE MINING STRUCTURE operation?
If we use BI Dev Studio, it's much easier to use the wizard.
(5) I found I cannot create a mining model inside a mining structure through operation
CREATE MINING MODEL. If you call that operation, you end up having a mining
model and a mining structure with the same name. I found that in order to create a
mining model inside a mining structure you have to call operation ALTER MINING
STRUCTURE ADD MINING MODEL. Is it true this is the only way?
Thank you,
Bernaridho
Are you looking to embed or automate your mining structure/model creation and training?
Unless you're programmatically creating and training mining structures/models or binding them to in-memory data, the preferred way to create and train them is to use Business Intelligence Development Studio (BIDS).
Answers to your questions:
1) In order to process a mining structure, you need to associate it with some training data. When you create a mining structure in BIDS, you also bind it to a data source view, so when you process it, the Analysis Services engine knows where to fetch the training data from and how to bind it to specific columns in the mining structure. However, if you use CREATE MINING STRUCTURE, you're not providing this association to your training data (which explains the error you're seeing). So you need to either use the INSERT INTO statement or use an XMLA Process statement with out-of-line bindings to data (from an existing data source view, an input rowset parameter or an OPENQUERY clause included in the INSERT-INTO statement).
2) Yes, CREATE MINING STRUCTURE defines your problem space - you can then add models and process the structure/models using training data provided at process time as described above. This is useful when creating mining structures/models programmatically.
3) The RELATED TO clause is used to specify a direct relationship (typically hierarchical) between columns at the same level (case or nested) in a mining structure. It's not used for binding to AttributeRelationships in OLAP (is that what you meant?).
4) See 2 above.
5) Yes, CREATE MINING MODEL will implicitly create a new mining structure to contain the mining model being defined. ALTER MINING STRUCTURE ADD MINING MODEL is the only way to add a mining model to an existing mining structure using DMX.
|||Dear Raman,Thank you for the explanation, especially about the in-memory. I cannot find your answer to the #1question in Books Online, and glad to get it from you.
Also, I hope someday Microsoft can improve the syntax of Data Mining Extension by adding
the syntax to ALTER MINING MODEL or by making WITH DRILLTHROUGH as the
default option. I create mining model programmatically in Management Studio, and cannot
change it because the absence of operation ALTER MINING MODEL. Just a wish.
Again, thank you.