Showing posts with label metadata. Show all posts
Showing posts with label metadata. Show all posts

Monday, March 19, 2012

Errors in the metadata manager while running "SQL Server 2005 Data Mining Configuration Wiz

Hi,

When I'm running Getting Started "Microsoft SQL Server 2005 Data Mining Add-Ins for Office 2005" for Excel and

1. choose "Use an existing instance of Microsoft SQL Server 2005 Analysis Services that I administer"

2. Click "Next"

3. To run the Server Configuration Utility, Click on link provided:

C:\Program Files\Microsoft SQL Server 2005 DM Add-Ins\Microsoft.SqlServer.DataMining.Office.ServerConfiguration.exe

4.This opens a new configuration wizard - SQL Server 2005 Data Mining Configuration Wizard

i. Click Next

ii. Select Server Name "localhost" and Clicked Next

iii. Checked "Allow creating temporary mining models" and Clicked Next

vi. In Step 3, By default radio button "Create New Database" is selected and Database Name is "DMAddinsDB"

Here, I've got following error in the message box :

Errors in the metadata manager. The dimension with ID of 'Dim Employee', Name of 'Dim Employee' referenced by the 'Adventure Works DW' cube, does not exist. Errors in the metadata manager. An error occurred when loading the Adventure Works DW cube, from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\Analysis Services Project1.0.db\Adventure Works DW.5.cub.xml'.

I've droped existing "Adventureworks" and "AdventureworksDW" databases and recreated again but still i'm getting the same problem.

Please help to resolve this problem

Thanks!

Regards,

K. Sandeep

It seems that the "Analysis Services Project1" database on your server is corrupted. Could you try to remove that database, then re-run the ...ServerConfiguration.exe application?

Errors in the metadata manager

Good afternoon,

I'm having the following error when I run my mining model.

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

I think the error is in caseprocessor.cpp at the ProcessCase method. There's a code snippet below:

The intention of the following code snippet is to run over the attributes of a case and put them on a vector that holds all the cases.

for (UINT iAttribute = 0; iAttribute < _cAttribute; iAttribute++) {

if(iAttribute == 0)

continue;

if(iAttribute == 1)

continue;

if(iAttribute == 2)

continue;

if(iAttribute == 3) {

vet_termos.push_back(rgdmstatevalue[iAttribute].ch);

continue;

if(iAttribute == 4)

vet_dados.push_back(rgdmstatevalue[iAttribute].r8);

DBL dblValue = 0;

if (_vbCategorical[iAttribute]) {

dblValue = (_bMissingAtRandom)

? ::DblCategoricalMAR(rgdmstatevalue[iAttribute])

: ::DblCategorical(rgdmstatevalue[iAttribute]);

}

if (_viewtype == CASEREADER::viewtypeSparse) {

if (dblValue != dblMissing) {

CHECK_STL_MEM(_vdblValue.push_back(dblValue));

CHECK_STL_MEM(_viAttribute.push_back(iAttribute));

}

}

else {

_vdblValue[iAttribute] = dblValue;

}

The attributes of the table are like following:

Index (iAttribute) == 0 -> This is an auto-incremental ID and is the primary key. Integer.

Index (iAttribute) == 1 -> Another ID. Non-key on this table. It is Integer.

Index (iAttribute) == 2 -> Another ID. Non-key on this table. It is integer.

Index (iAttribute) == 3 -> A term. It's a word. This is non-key and the type is varchar.

Index (iAttribute) == 4 -> Weight of the word. Non-key and type double.

As you can notice I also changed the union DM_STATE_VALUE definition on dmalgo.h to accept the reading of a string (if (iAttribute == 3)) :

typedef /* [public][public][public][public][public][public][public] */ union __MIDLMIDL_itf_dmalgo_0000_0002 {

DM_STATE_INDEX si;

DOUBLE r8;

char* ch;

} DM_STATE_VALUE;

So... Does anyone can help me with the error I discribed on the metadata manager ? I would be very pleased with any help.

Thanks a lot for your attention.

-Renan Souza

Good afternoon,

I've tryed to run the Microsoft Clustering algorithm on this table and I've got the following error:

Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

So... I think the error is, somehow, on the table structure, or somethig like that...

Any ideas on how to fix this problem ?

Thanks a lot once more,

-Renan

|||

Hello

First, could you please try a Process Full on the mining structure?

If that does not work, is it possible for you to send the definition of your structure? (Right-click on the structure in the SQL Server Management Studio, select Script as Create and send the script to "bogdanc at sqlserverdatamining dot com")

|||

Dear Mr. Crivat,

Thanks for your prompt reply.

I get this error when I try to deply the model, before I choose the Process Full option: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

When I get this error a window prompts and asks me if I wish to continue anyway. I click 'yes' but the process fails when I run the model.

This second error is the one I discribed earlyer, as following:

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

Any clues ?

Thanks a lot once more,

-Renan

|||Could you please send me (or post here) the DDL script for your mining structure ? (I included my email in my previous post)|||

Dear Mr. Drivat,

Here's the script. I also sent it to your e-mail.

USE [BM_TEXTOS]

GO

/****** Object: Table [dbo].[TMP] Script Date: 10/03/2001 10:23:50 ******/

SETANSI_NULLSON

GO

SETQUOTED_IDENTIFIERON

GO

SETANSI_PADDINGON

GO

CREATETABLE [dbo].[TMP](

[ID] [int] NOTNULL,

[ID_DOC] [int] NOTNULL,

[ID_TERMO] [int] NOTNULL,

[TERMO] [varchar](max)COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL,

[FREQ] [real] NOTNULL,

PRIMARYKEYCLUSTERED

(

[ID] ASC

)WITH(IGNORE_DUP_KEY =OFF)ON [PRIMARY]

)ON [PRIMARY]

GO

SETANSI_PADDINGOFF

Thanks a lot once more,

-Renan

|||

Hi
I meant, for the Analysis Services mining structure and model. This seems to be for the relational table that contains the training data

thanks

|||

Sorry... Forgive my mistake. Here's the script:

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ParentObject>

<DatabaseID>Analysis Services Project3</DatabaseID>

</ParentObject>

<ObjectDefinition>

<MiningStructure xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ID>TMP</ID>

<Name>TMP</Name>

<Annotations>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:CaseTableName</Name>

<Value>dbo_TMP</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramLayout</Name>

<Value>

<dds xmlns="">

<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}" mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}" defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear" version="7" nextobject="2" scale="100" pagebreakanchorx="0" pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0" scrollleft="-7330" scrolltop="-4326" gridx="150" gridy="150" marginx="5000" marginy="5000" zoom="100" x="17701" y="11800" backcolor="15334399" defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0" PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0" marqueeselectionmode="0" mousepointer="0" snaptogrid="0" autotypeannotation="1" showscrollbars="0" viewpagebreaks="0" donotforceconnectorsbehindshapes="1" backpictureclsid="{00000000-0000-0000-0000-000000000000}">

<font>

<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />

</font>

<mouseicon>

<ddsxmlobjectstreamwrapper binary="6c74000000000000" />

</mouseicon>

</diagram>

<layoutmanager>

<ddsxmlobj />

</layoutmanager>

<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="TMP (dbo.TMP)" left="20" top="0" logicalid="1" controlid="1" masterid="0" hint1="0" hint2="0" width="3000" height="3149" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0">

<control>

<ddsxmlobjectstreaminitwrapper binary="00080000b80b00004d0c0000" />

</control>

<layoutobject>

<ddsxmlobj>

<property name="LogicalObject" value="dbo_TMP" vartype="8" />

</ddsxmlobj>

</layoutobject>

<shape groupshapeid="0" groupnode="0" />

</ddscontrol>

</dds>

</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowRelationshipNames</Name>

<Value>false</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:UseDiagramDefaultLayout</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortLeft</Name>

<Value>-7330</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortTop</Name>

<Value>-4326</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingLeft</Name>

<Value>20</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingTop</Name>

<Value>0</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramZoom</Name>

<Value>100</Value>

</Annotation>

</Annotations>

<Source xsi:type="DataSourceViewBinding">

<DataSourceViewID>BM TEXTOS</DataSourceViewID>

</Source>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

<Columns>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>FREQ</ID>

<Name>FREQ</Name>

<Type>Double</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Single</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>FREQ</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID</ID>

<Name>ID</Name>

<IsKey>true</IsKey>

<Type>Long</Type>

<Content>Key Time</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_DOC</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>TERMO</ID>

<Name>TERMO</Name>

<Type>Text</Type>

<Content>Discrete</Content>

<KeyColumns>

<KeyColumn>

<DataType>WChar</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

</Columns>

<MiningModels>

<MiningModel>

<ID>TMP</ID>

<Name>TMP</Name>

<Algorithm>PBM_K-MEANS</Algorithm>

<Columns>

<Column>

<ID>FREQ</ID>

<Name>FREQ</Name>

<SourceColumnID>FREQ</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID</ID>

<Name>ID</Name>

<SourceColumnID>ID</SourceColumnID>

<Usage>Key</Usage>

</Column>

<Column>

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<SourceColumnID>ID DOC</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<SourceColumnID>ID TERMO</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>TERMO</ID>

<Name>TERMO</Name>

<SourceColumnID>TERMO</SourceColumnID>

<Usage>Predict</Usage>

</Column>

</Columns>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

</MiningModel>

</MiningModels>

</MiningStructure>

</ObjectDefinition>

</Create>

Thanks a lot once more,

-Renan

|||

Hello

The one unexpected thing I see in your structure is that the key column of the structure, ID, is marked as Key Time. Is this the intention? Key Time columns are modeled, inside the structure, differently than other columns. The Key Time modeling is intended for Time Series models, where the Key Time (the time slice) is an actual modeling attribute. Was that the intention?

If you only intend to keep ID as a Key (i.e. row identifier, used at most in drillthrough), then I'd suggest to change it to Key (instead of Key Time) and maybe remove the support for Key Time from your algorithm

Does this help?

|||

Dear Mr. Crivat,

Your explanations were very helpful, as usual.

I thought about this time key matter, so when I'm creating the mining structure using the wizard, I manually set the ID collumn as key (it first appears as time key) on the "Specify Column's Contents and Data Types" page.

But when I do it I get the following error when deploying: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

I realized that it happens because somewhere the ID column is set as"time key" and when I try to deploy it as "key, it crashes.

I'm creating the table on a external Java program that runs the following code:

CREATE TABLE TMP (ID INT NOT NULL, ID_DOC INT NOT NULL, ID_TERMO INT NOT NULL, TERMO VARCHAR(MAX) NOT NULL, FREQ REAL NOT NULL)

GO
ALTER TABLE TMP ADD PRIMARY KEY(ID ASC);

Is there some reason for the key's content is been created as time key ? How to fix it ?

Thanks a lot again,

-Renan

|||

First, make sure your algorithm supports Key and does not support key time. For this, in your metadata class, make sure that GetSupInputContentTypes includes DM_MININGCOLUMN_CONTENT_KEY and does not include DM_MININGCOLUMN_CONTENT_KEY_TIME.

This should fix the problem you are seeing. However, KEY_TIME is not supported by your algorithm, then one thing you could try is the following:

- create (using the wizard) a Decision Tree model on your data.

- in the newly created structure, add a related model using your algorithm

- remove the DT model

The creation of the DT model will configure the key properly at the structure level.

|||

Problem solved.

Thanks a lot again. But I've got a new one I'm posting on a new thread.

Errors in the metadata manager

Good afternoon,

I'm having the following error when I run my mining model.

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

I think the error is in caseprocessor.cpp at the ProcessCase method. There's a code snippet below:

The intention of the following code snippet is to run over the attributes of a case and put them on a vector that holds all the cases.

for (UINT iAttribute = 0; iAttribute < _cAttribute; iAttribute++) {

if(iAttribute == 0)

continue;

if(iAttribute == 1)

continue;

if(iAttribute == 2)

continue;

if(iAttribute == 3) {

vet_termos.push_back(rgdmstatevalue[iAttribute].ch);

continue;

if(iAttribute == 4)

vet_dados.push_back(rgdmstatevalue[iAttribute].r8);

DBL dblValue = 0;

if (_vbCategorical[iAttribute]) {

dblValue = (_bMissingAtRandom)

? ::DblCategoricalMAR(rgdmstatevalue[iAttribute])

: ::DblCategorical(rgdmstatevalue[iAttribute]);

}

if (_viewtype == CASEREADER::viewtypeSparse) {

if (dblValue != dblMissing) {

CHECK_STL_MEM(_vdblValue.push_back(dblValue));

CHECK_STL_MEM(_viAttribute.push_back(iAttribute));

}

}

else {

_vdblValue[iAttribute] = dblValue;

}

The attributes of the table are like following:

Index (iAttribute) == 0 -> This is an auto-incremental ID and is the primary key. Integer.

Index (iAttribute) == 1 -> Another ID. Non-key on this table. It is Integer.

Index (iAttribute) == 2 -> Another ID. Non-key on this table. It is integer.

Index (iAttribute) == 3 -> A term. It's a word. This is non-key and the type is varchar.

Index (iAttribute) == 4 -> Weight of the word. Non-key and type double.

As you can notice I also changed the union DM_STATE_VALUE definition on dmalgo.h to accept the reading of a string (if (iAttribute == 3)) :

typedef /* [public][public][public][public][public][public][public] */ union __MIDLMIDL_itf_dmalgo_0000_0002 {

DM_STATE_INDEX si;

DOUBLE r8;

char* ch;

} DM_STATE_VALUE;

So... Does anyone can help me with the error I discribed on the metadata manager ? I would be very pleased with any help.

Thanks a lot for your attention.

-Renan Souza

Good afternoon,

I've tryed to run the Microsoft Clustering algorithm on this table and I've got the following error:

Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

So... I think the error is, somehow, on the table structure, or somethig like that...

Any ideas on how to fix this problem ?

Thanks a lot once more,

-Renan

|||

Hello

First, could you please try a Process Full on the mining structure?

If that does not work, is it possible for you to send the definition of your structure? (Right-click on the structure in the SQL Server Management Studio, select Script as Create and send the script to "bogdanc at sqlserverdatamining dot com")

|||

Dear Mr. Crivat,

Thanks for your prompt reply.

I get this error when I try to deply the model, before I choose the Process Full option: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

When I get this error a window prompts and asks me if I wish to continue anyway. I click 'yes' but the process fails when I run the model.

This second error is the one I discribed earlyer, as following:

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

Any clues ?

Thanks a lot once more,

-Renan

|||Could you please send me (or post here) the DDL script for your mining structure ? (I included my email in my previous post)|||

Dear Mr. Drivat,

Here's the script. I also sent it to your e-mail.

USE [BM_TEXTOS]

GO

/****** Object: Table [dbo].[TMP] Script Date: 10/03/2001 10:23:50 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[TMP](

[ID] [int] NOT NULL,

[ID_DOC] [int] NOT NULL,

[ID_TERMO] [int] NOT NULL,

[TERMO] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

[FREQ] [real] NOT NULL,

PRIMARY KEY CLUSTERED

(

[ID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

Thanks a lot once more,

-Renan

|||

Hi
I meant, for the Analysis Services mining structure and model. This seems to be for the relational table that contains the training data

thanks

|||

Sorry... Forgive my mistake. Here's the script:

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ParentObject>

<DatabaseID>Analysis Services Project3</DatabaseID>

</ParentObject>

<ObjectDefinition>

<MiningStructure xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ID>TMP</ID>

<Name>TMP</Name>

<Annotations>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:CaseTableName</Name>

<Value>dbo_TMP</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramLayout</Name>

<Value>

<dds xmlns="">

<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}" mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}" defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear" version="7" nextobject="2" scale="100" pagebreakanchorx="0" pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0" scrollleft="-7330" scrolltop="-4326" gridx="150" gridy="150" marginx="5000" marginy="5000" zoom="100" x="17701" y="11800" backcolor="15334399" defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0" PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0" marqueeselectionmode="0" mousepointer="0" snaptogrid="0" autotypeannotation="1" showscrollbars="0" viewpagebreaks="0" donotforceconnectorsbehindshapes="1" backpictureclsid="{00000000-0000-0000-0000-000000000000}">

<font>

<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />

</font>

<mouseicon>

<ddsxmlobjectstreamwrapper binary="6c74000000000000" />

</mouseicon>

</diagram>

<layoutmanager>

<ddsxmlobj />

</layoutmanager>

<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="TMP (dbo.TMP)" left="20" top="0" logicalid="1" controlid="1" masterid="0" hint1="0" hint2="0" width="3000" height="3149" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0">

<control>

<ddsxmlobjectstreaminitwrapper binary="00080000b80b00004d0c0000" />

</control>

<layoutobject>

<ddsxmlobj>

<property name="LogicalObject" value="dbo_TMP" vartype="8" />

</ddsxmlobj>

</layoutobject>

<shape groupshapeid="0" groupnode="0" />

</ddscontrol>

</dds>

</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowRelationshipNames</Name>

<Value>false</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:UseDiagramDefaultLayout</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortLeft</Name>

<Value>-7330</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortTop</Name>

<Value>-4326</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingLeft</Name>

<Value>20</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingTop</Name>

<Value>0</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramZoom</Name>

<Value>100</Value>

</Annotation>

</Annotations>

<Source xsi:type="DataSourceViewBinding">

<DataSourceViewID>BM TEXTOS</DataSourceViewID>

</Source>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

<Columns>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>FREQ</ID>

<Name>FREQ</Name>

<Type>Double</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Single</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>FREQ</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID</ID>

<Name>ID</Name>

<IsKey>true</IsKey>

<Type>Long</Type>

<Content>Key Time</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_DOC</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>TERMO</ID>

<Name>TERMO</Name>

<Type>Text</Type>

<Content>Discrete</Content>

<KeyColumns>

<KeyColumn>

<DataType>WChar</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

</Columns>

<MiningModels>

<MiningModel>

<ID>TMP</ID>

<Name>TMP</Name>

<Algorithm>PBM_K-MEANS</Algorithm>

<Columns>

<Column>

<ID>FREQ</ID>

<Name>FREQ</Name>

<SourceColumnID>FREQ</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID</ID>

<Name>ID</Name>

<SourceColumnID>ID</SourceColumnID>

<Usage>Key</Usage>

</Column>

<Column>

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<SourceColumnID>ID DOC</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<SourceColumnID>ID TERMO</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>TERMO</ID>

<Name>TERMO</Name>

<SourceColumnID>TERMO</SourceColumnID>

<Usage>Predict</Usage>

</Column>

</Columns>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

</MiningModel>

</MiningModels>

</MiningStructure>

</ObjectDefinition>

</Create>

Thanks a lot once more,

-Renan

|||

Hello

The one unexpected thing I see in your structure is that the key column of the structure, ID, is marked as Key Time. Is this the intention? Key Time columns are modeled, inside the structure, differently than other columns. The Key Time modeling is intended for Time Series models, where the Key Time (the time slice) is an actual modeling attribute. Was that the intention?

If you only intend to keep ID as a Key (i.e. row identifier, used at most in drillthrough), then I'd suggest to change it to Key (instead of Key Time) and maybe remove the support for Key Time from your algorithm

Does this help?

|||

Dear Mr. Crivat,

Your explanations were very helpful, as usual.

I thought about this time key matter, so when I'm creating the mining structure using the wizard, I manually set the ID collumn as key (it first appears as time key) on the "Specify Column's Contents and Data Types" page.

But when I do it I get the following error when deploying: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

I realized that it happens because somewhere the ID column is set as"time key" and when I try to deploy it as "key, it crashes.

I'm creating the table on a external Java program that runs the following code:

CREATE TABLE TMP (ID INT NOT NULL, ID_DOC INT NOT NULL, ID_TERMO INT NOT NULL, TERMO VARCHAR(MAX) NOT NULL, FREQ REAL NOT NULL)

GO
ALTER TABLE TMP ADD PRIMARY KEY(ID ASC);

Is there some reason for the key's content is been created as time key ? How to fix it ?

Thanks a lot again,

-Renan

|||

First, make sure your algorithm supports Key and does not support key time. For this, in your metadata class, make sure that GetSupInputContentTypes includes DM_MININGCOLUMN_CONTENT_KEY and does not include DM_MININGCOLUMN_CONTENT_KEY_TIME.

This should fix the problem you are seeing. However, KEY_TIME is not supported by your algorithm, then one thing you could try is the following:

- create (using the wizard) a Decision Tree model on your data.

- in the newly created structure, add a related model using your algorithm

- remove the DT model

The creation of the DT model will configure the key properly at the structure level.

|||

Problem solved.

Thanks a lot again. But I've got a new one I'm posting on a new thread.

Errors in the metadata manager

Good afternoon,

I'm having the following error when I run my mining model.

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

I think the error is in caseprocessor.cpp at the ProcessCase method. There's a code snippet below:

The intention of the following code snippet is to run over the attributes of a case and put them on a vector that holds all the cases.

for (UINT iAttribute = 0; iAttribute < _cAttribute; iAttribute++) {

if(iAttribute == 0)

continue;

if(iAttribute == 1)

continue;

if(iAttribute == 2)

continue;

if(iAttribute == 3) {

vet_termos.push_back(rgdmstatevalue[iAttribute].ch);

continue;

if(iAttribute == 4)

vet_dados.push_back(rgdmstatevalue[iAttribute].r8);

DBL dblValue = 0;

if (_vbCategorical[iAttribute]) {

dblValue = (_bMissingAtRandom)

? ::DblCategoricalMAR(rgdmstatevalue[iAttribute])

: ::DblCategorical(rgdmstatevalue[iAttribute]);

}

if (_viewtype == CASEREADER::viewtypeSparse) {

if (dblValue != dblMissing) {

CHECK_STL_MEM(_vdblValue.push_back(dblValue));

CHECK_STL_MEM(_viAttribute.push_back(iAttribute));

}

}

else {

_vdblValue[iAttribute] = dblValue;

}

The attributes of the table are like following:

Index (iAttribute) == 0 -> This is an auto-incremental ID and is the primary key. Integer.

Index (iAttribute) == 1 -> Another ID. Non-key on this table. It is Integer.

Index (iAttribute) == 2 -> Another ID. Non-key on this table. It is integer.

Index (iAttribute) == 3 -> A term. It's a word. This is non-key and the type is varchar.

Index (iAttribute) == 4 -> Weight of the word. Non-key and type double.

As you can notice I also changed the union DM_STATE_VALUE definition on dmalgo.h to accept the reading of a string (if (iAttribute == 3)) :

typedef /* [public][public][public][public][public][public][public] */ union __MIDLMIDL_itf_dmalgo_0000_0002 {

DM_STATE_INDEX si;

DOUBLE r8;

char* ch;

} DM_STATE_VALUE;

So... Does anyone can help me with the error I discribed on the metadata manager ? I would be very pleased with any help.

Thanks a lot for your attention.

-Renan Souza

Good afternoon,

I've tryed to run the Microsoft Clustering algorithm on this table and I've got the following error:

Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

So... I think the error is, somehow, on the table structure, or somethig like that...

Any ideas on how to fix this problem ?

Thanks a lot once more,

-Renan

|||

Hello

First, could you please try a Process Full on the mining structure?

If that does not work, is it possible for you to send the definition of your structure? (Right-click on the structure in the SQL Server Management Studio, select Script as Create and send the script to "bogdanc at sqlserverdatamining dot com")

|||

Dear Mr. Crivat,

Thanks for your prompt reply.

I get this error when I try to deply the model, before I choose the Process Full option: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

When I get this error a window prompts and asks me if I wish to continue anyway. I click 'yes' but the process fails when I run the model.

This second error is the one I discribed earlyer, as following:

Errors in the metadata manager. The dimension with the ID of 'TMP ~MC-ID' cannot be found in the '' database.

Any clues ?

Thanks a lot once more,

-Renan

|||Could you please send me (or post here) the DDL script for your mining structure ? (I included my email in my previous post)|||

Dear Mr. Drivat,

Here's the script. I also sent it to your e-mail.

USE [BM_TEXTOS]

GO

/****** Object: Table [dbo].[TMP] Script Date: 10/03/2001 10:23:50 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[TMP](

[ID] [int] NOT NULL,

[ID_DOC] [int] NOT NULL,

[ID_TERMO] [int] NOT NULL,

[TERMO] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

[FREQ] [real] NOT NULL,

PRIMARY KEY CLUSTERED

(

[ID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

Thanks a lot once more,

-Renan

|||

Hi
I meant, for the Analysis Services mining structure and model. This seems to be for the relational table that contains the training data

thanks

|||

Sorry... Forgive my mistake. Here's the script:

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ParentObject>

<DatabaseID>Analysis Services Project3</DatabaseID>

</ParentObject>

<ObjectDefinition>

<MiningStructure xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ID>TMP</ID>

<Name>TMP</Name>

<Annotations>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:CaseTableName</Name>

<Value>dbo_TMP</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowFriendlyNames</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramLayout</Name>

<Value>

<dds xmlns="">

<diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}" mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}" defaultlayout="MSDDS.Rectilinear" defaultlineroute="MSDDS.Rectilinear" version="7" nextobject="2" scale="100" pagebreakanchorx="0" pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0" scrollleft="-7330" scrolltop="-4326" gridx="150" gridy="150" marginx="5000" marginy="5000" zoom="100" x="17701" y="11800" backcolor="15334399" defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0" PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0" marqueeselectionmode="0" mousepointer="0" snaptogrid="0" autotypeannotation="1" showscrollbars="0" viewpagebreaks="0" donotforceconnectorsbehindshapes="1" backpictureclsid="{00000000-0000-0000-0000-000000000000}">

<font>

<ddsxmlobjectstreamwrapper binary="01000000900144420100065461686f6d61" />

</font>

<mouseicon>

<ddsxmlobjectstreamwrapper binary="6c74000000000000" />

</mouseicon>

</diagram>

<layoutmanager>

<ddsxmlobj />

</layoutmanager>

<ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="TMP (dbo.TMP)" left="20" top="0" logicalid="1" controlid="1" masterid="0" hint1="0" hint2="0" width="3000" height="3149" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0">

<control>

<ddsxmlobjectstreaminitwrapper binary="00080000b80b00004d0c0000" />

</control>

<layoutobject>

<ddsxmlobj>

<property name="LogicalObject" value="dbo_TMP" vartype="8" />

</ddsxmlobj>

</layoutobject>

<shape groupshapeid="0" groupnode="0" />

</ddscontrol>

</dds>

</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:ShowRelationshipNames</Name>

<Value>false</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:UseDiagramDefaultLayout</Name>

<Value>true</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortLeft</Name>

<Value>-7330</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramViewPortTop</Name>

<Value>-4326</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingLeft</Name>

<Value>20</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramBoundingTop</Name>

<Value>0</Value>

</Annotation>

<Annotation>

<Name>http://schemas.microsoft.com/DataWarehouse/Designer/1.0:DiagramZoom</Name>

<Value>100</Value>

</Annotation>

</Annotations>

<Source xsi:type="DataSourceViewBinding">

<DataSourceViewID>BM TEXTOS</DataSourceViewID>

</Source>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

<Columns>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>FREQ</ID>

<Name>FREQ</Name>

<Type>Double</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Single</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>FREQ</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID</ID>

<Name>ID</Name>

<IsKey>true</IsKey>

<Type>Long</Type>

<Content>Key Time</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_DOC</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<Type>Long</Type>

<Content>Continuous</Content>

<KeyColumns>

<KeyColumn>

<DataType>Integer</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>ID_TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

<Column xsi:type="ScalarMiningStructureColumn">

<ID>TERMO</ID>

<Name>TERMO</Name>

<Type>Text</Type>

<Content>Discrete</Content>

<KeyColumns>

<KeyColumn>

<DataType>WChar</DataType>

<DataSize>-1</DataSize>

<Source xsi:type="ColumnBinding">

<TableID>dbo_TMP</TableID>

<ColumnID>TERMO</ColumnID>

</Source>

</KeyColumn>

</KeyColumns>

</Column>

</Columns>

<MiningModels>

<MiningModel>

<ID>TMP</ID>

<Name>TMP</Name>

<Algorithm>PBM_K-MEANS</Algorithm>

<Columns>

<Column>

<ID>FREQ</ID>

<Name>FREQ</Name>

<SourceColumnID>FREQ</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID</ID>

<Name>ID</Name>

<SourceColumnID>ID</SourceColumnID>

<Usage>Key</Usage>

</Column>

<Column>

<ID>ID DOC</ID>

<Name>ID DOC</Name>

<SourceColumnID>ID DOC</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>ID TERMO</ID>

<Name>ID TERMO</Name>

<SourceColumnID>ID TERMO</SourceColumnID>

<Usage>Predict</Usage>

<ModelingFlags>

<ModelingFlag>REGRESSOR</ModelingFlag>

</ModelingFlags>

</Column>

<Column>

<ID>TERMO</ID>

<Name>TERMO</Name>

<SourceColumnID>TERMO</SourceColumnID>

<Usage>Predict</Usage>

</Column>

</Columns>

<Language>1033</Language>

<Collation>Latin1_General_CI_AS</Collation>

</MiningModel>

</MiningModels>

</MiningStructure>

</ObjectDefinition>

</Create>

Thanks a lot once more,

-Renan

|||

Hello

The one unexpected thing I see in your structure is that the key column of the structure, ID, is marked as Key Time. Is this the intention? Key Time columns are modeled, inside the structure, differently than other columns. The Key Time modeling is intended for Time Series models, where the Key Time (the time slice) is an actual modeling attribute. Was that the intention?

If you only intend to keep ID as a Key (i.e. row identifier, used at most in drillthrough), then I'd suggest to change it to Key (instead of Key Time) and maybe remove the support for Key Time from your algorithm

Does this help?

|||

Dear Mr. Crivat,

Your explanations were very helpful, as usual.

I thought about this time key matter, so when I'm creating the mining structure using the wizard, I manually set the ID collumn as key (it first appears as time key) on the "Specify Column's Contents and Data Types" page.

But when I do it I get the following error when deploying: Error 1 Error (Data mining): The source OLAP object for the 'ID' column of the 'TMP' model cannot be found. 0 0

I realized that it happens because somewhere the ID column is set as"time key" and when I try to deploy it as "key, it crashes.

I'm creating the table on a external Java program that runs the following code:

CREATE TABLE TMP (ID INT NOT NULL, ID_DOC INT NOT NULL, ID_TERMO INT NOT NULL, TERMO VARCHAR(MAX) NOT NULL, FREQ REAL NOT NULL)

GO
ALTER TABLE TMP ADD PRIMARY KEY(ID ASC);

Is there some reason for the key's content is been created as time key ? How to fix it ?

Thanks a lot again,

-Renan

|||

First, make sure your algorithm supports Key and does not support key time. For this, in your metadata class, make sure that GetSupInputContentTypes includes DM_MININGCOLUMN_CONTENT_KEY and does not include DM_MININGCOLUMN_CONTENT_KEY_TIME.

This should fix the problem you are seeing. However, KEY_TIME is not supported by your algorithm, then one thing you could try is the following:

- create (using the wizard) a Decision Tree model on your data.

- in the newly created structure, add a related model using your algorithm

- remove the DT model

The creation of the DT model will configure the key properly at the structure level.

|||

Problem solved.

Thanks a lot again. But I've got a new one I'm posting on a new thread.

Errors in the metadata manager

Hello,
I'm trying to process a cube and i'm getting the following error message. I'm not working in Analysis Services Project 4, i created another project. I deleted Analysis Services Project 4 and every project i try to execute i get this error message.

"Error 1 File system error: Error opening file; \\?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\Analysis Services Project4.0.db\TBLE~MC.0.cub.xml is not a disk file or file is not accessible. Errors in the metadata manager. An error occurred when loading the TBLE~MC cube, from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\Analysis Services Project4.0.db\TBLE~MC.0.cub.xml'. File system error: The following error occurred while writing to the file 'MSSQLServerOLAPService': The event log file is full. . 0 0 "

Any ideas how to solve this problem?

Thank you in advance.

Looks like the data folder is corrupted. Could you please try the following steps:

1. Stop the Analysis Services service
2. Delete everything in your C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\%YOUR_PROJECTNAME% folder
3. Restart the Analysis Services service
4. Re-deploy your project

Hope this helps,

Artur

|||

I already try this but without stopping the analysis services and didn't work.

I will try it again... thanks for the help:)

|||

You should really stop Analysis Server :)

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 19, 2012

Error: The external metadata column collection is out of synchronization with the data source co

Hello,

I have a SSIS package with a Data Flow task. This task transfers the data from SQL Server 2000 to a table in SQL Server 2005.

I deployed and tested this package on the Test Server. Then put this package in a job and executed it - Works fine.

On the production server- If I execute the package through DTEXECUI, it works fine. But when I try executing it through a job- the job fails and it gives me following error:

Description: The external metadata column collection is out of synchronization with the data source columns. The "external metadata column "T_FieldName" (82)" needs to be removed from the external metadata column collection....

What I don't understand is, why are there no errors displayed when I execute the package through DTEXECUI.

Can anyone help me to resolve this issue.

Thanks.

JayaC wrote:

Hello,

I have a SSIS package with a Data Flow task. This task transfers the data from SQL Server 2000 to a table in SQL Server 2005.

I deployed and tested this package on the Test Server. Then put this package in a job and executed it - Works fine.

On the production server- If I execute the package through DTEXECUI, it works fine. But when I try executing it through a job- the job fails and it gives me following error:

Description: The external metadata column collection is out of synchronization with the data source columns. The "external metadata column "T_FieldName" (82)" needs to be removed from the external metadata column collection....

What I don't understand is, why are there no errors displayed when I execute the package through DTEXECUI.

Can anyone help me to resolve this issue.

Thanks.

I can only guess that it is looking at the wrong data source or something. This is most likely symptomatic of something else. Check that the account you are running SQL Agent as has got all the relevant permissions.

-Jamie

|||

Thanks Jamie,

Account under which the SQL Server Agent was running was causing the problem- Permissions Issue.

Error: The component has inconsistent metadata

I have a Source Query with this sql set as a property expression:

"SELECT Category, Server_Name, Entitle_UserID,User_SubID,Start_Time,End_Time,Entitle_User_Name,Stat_Name,Stat_Count,Stat_Type,pk,create_date,run_num,Average,Median,Maximim FROM tbl_ws_stats WHERE pk > " + (DT_STR, 100, 1252)@.[pk_var]

There is a message : 'The component has inconsistent metadata.'

Then when I click on the Source Query: 'The component is not in a valid state. Do you want the component to fix itself automatically?'

I also notice that there are no columns on the Column Mappings tab and no way to add columns.

How can I correct?

Thanks

Additional info, also receiving these errors when executing the package:


[DTS.Pipeline] Error: input column "" (94) has lineage ID 12 that was not previously used in the Data Flow task.

[DTS.Pipeline] Error: "component "Destination - tbl_WS_Stats" (60)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

|||

You could do worse than to (a) back up your package, and (b) let SSIS fix up the metadata automatically ... and see what results.

Donald

|||

I tried responding 'yes' when prompted to automatically fix the metadata. That did not work. Is there anyway to manually fix or another workaround?

|||What were the symptoms of the automatic fix not working? No columns?|||

That's correct. There are no columns. Is there any way for me to fix this?

Thanks

|||What value is PK (Sample values)
What value are you passing pk_var?

WHERE pk > " + (DT_STR, 100, 1252)@.[pk_var]

What happens when you remove your where clause? I suspect it's something with the where but can't tell without more information.

|||

pk is a numeric value
pk_var is a package variable with a value of 1051062000

Tried changing the sql statement to the following without the where clause, to rule out issue with pk_var. I had the same issue as before.


"SELECT Category, Server_Name, Entitle_UserID,User_SubID,Start_Time,
End_Time,Entitle_User_Name,Stat_Name,Stat_Count,Stat_Type,pk,
create_date,run_num,Average,Median,Maximim FROM tbl_ws_stats"

Thanks

|||Compare each column's source datatype with the target datatype. That is the only way you will fix this issue. One of them must be inconsistent.

(P.S. that query is structured very inefficiently and will be slow if you have many rows)