Showing posts with label model. Show all posts
Showing posts with label model. Show all posts

Wednesday, March 21, 2012

Is the operation CREATE MINING STRUCTURE and CREATE MINING MODEL really useful?

Hi,

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.

Is such a report possible using SSRS 2005 Report Builder?

I have RS 2005 SP1. I have a report model developed and deployed.

I have a scenario and I am not sure if it is possible to create a report for this scenario using the report builder. Let's say I have a customers entity and address entity that is related to the customer's entity as a 1-many relationship. I have the effective date on the address that specifies the date from which the address is effective. A customer will have multiple records in address with the latest effective date as the latest address of the customer.

Suppose, I need to create a report using the report builder to get the list of latest address for customers, how can I do it? I know it can be done using the report designer using a query that uses the group by clause. But can it be done using report builder?

Thanks in advance.

can someone help? Thanks.|||you can just do that in the SQL query in the data set:

Code Snippet

select [customer_name], [Address1],[Address2]
from customer_table ct
inner join (

select customerID,

max(effective_date) as max_date

from address_table

where effective_date < getdate()) as TopAddress

inner join address_table at
on ct.customerID = at.customerID

and at.customerID = TopAddress.CustomerID

and at.effective_date = TopAddress.max_date


This will return all customers with their latest address, excluding any addresses with a future effective date.

There are other ways, eg with embedded sub reports but then, why add the complexity?|||

Thanks for your response.

I know this can be done and I can build a report using this query with the report designer. I wanted to know if a report with the same output can be built using the report builder?

|||My mistake - mixed up the report builder/designer.

Report builder is very very basic compared to the designer and is really meant for end users with some basic technical knowledge.

Expand your report model to add the data functionality you require

Use report builder to determine how to display that data.

Is such a report possible using SSRS 2005 Report Builder?

I have RS 2005 SP1. I have a report model developed and deployed.

I have a scenario and I am not sure if it is possible to create a report for this scenario using the report builder. Let's say I have a customers entity and address entity that is related to the customer's entity as a 1-many relationship. I have the effective date on the address that specifies the date from which the address is effective. A customer will have multiple records in address with the latest effective date as the latest address of the customer.

Suppose, I need to create a report using the report builder to get the list of latest address for customers, how can I do it? I know it can be done using the report designer using a query that uses the group by clause. But can it be done using report builder?

Thanks in advance.

can someone help? Thanks.|||you can just do that in the SQL query in the data set:

Code Snippet

select [customer_name], [Address1],[Address2]
from customer_table ct
inner join (

select customerID,

max(effective_date) as max_date

from address_table

where effective_date < getdate()) as TopAddress

inner join address_table at
on ct.customerID = at.customerID

and at.customerID = TopAddress.CustomerID

and at.effective_date = TopAddress.max_date


This will return all customers with their latest address, excluding any addresses with a future effective date.

There are other ways, eg with embedded sub reports but then, why add the complexity?|||

Thanks for your response.

I know this can be done and I can build a report using this query with the report designer. I wanted to know if a report with the same output can be built using the report builder?

|||My mistake - mixed up the report builder/designer.

Report builder is very very basic compared to the designer and is really meant for end users with some basic technical knowledge.

Expand your report model to add the data functionality you require

Use report builder to determine how to display that data.