Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Wednesday, March 7, 2012

Cube processing error: "The end of the input was reached"

I created a cube with AMO and examined it in BI Studio by importing. Everything looks fine, but I get the following error when processing the cube:

"Parser: The end of the input was reached".

The processing of dimensions appears to be successful. SSAS processes the cube immediately after finishing dimensions. That's where the error occurs. What is odd is that the process progress dialog box shows everything was completely successfully. I am quite sure that the processing of the cube was not completed because I cannot browse it and I know it takes much more than a duratio of 0 seconds to process the cube.

Could anyone offer some hint?

Thanks,

hz

It looks like the script you have for your cube contains syntax error. At least it should have "CALCULATE;" statement.
|||

I did not write the script. I wrote code in C# using AMO to create the cube. I do not know how to look at the script, but scripted the cube to a query editor window and did not see any CALCULATE statement. I also scripted a cube that is working perfectly and did not see CALCULATE in its script either.

At this point of time, I am temporarily giving up using AMO to create cubes and resorting to other means.

hz

Saturday, February 25, 2012

cube design/MDX for Product Owns vs does not Own

I would really appreciate if you could give us your input for following design, I am having hard time to visualize the cube design.

I have a fact table and dimension tables as follows with rows.

CREATE TABLE [dbo].[Fact_ProductOwnership](
[OrgID] [int] NULL,
[SegmentID] [int] NULL,
[SubSegmentID] [int] NULL,
[ProductID] [int] NOT NULL
) ON [PRIMARY]

OrgID SegmentID SubSegmentID ProductID 1 1 1 2 1 1 1 3 1 1 1 6 2 2 2 2 2 2 2 3 2 2 2 6 3 1 1 1 3 1 1 3 3 1 1 5

Segment table rows

CREATE TABLE [dbo].[Segment](
[ID] [int] NULL,
[SegmentName] [varchar](20) NULL
) ON [PRIMARY]

ID SegmentName

1 Enterprize

2 Small Business


SubgSegment table and Rows

CREATE TABLE [dbo].[SubSegment](
[ID] [int] NULL,
[SubSegmentName] [varchar](20) NULL
) ON [PRIMARY]

ID SubSegmentName

1 Enterprize

2 Small Business

Product table and Rows

CREATE TABLE [dbo].[Products](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ProductDesc] [varchar](20) NULL
) ON [PRIMARY]

ID ProductDesc

1 Access_Yes

2 Access_No

3 Excel_Yes

4 Excel_No

5 SqlServer_Yes

6 SqlServer_No

What I would like achieve from above design is to get the list orgs for the following scenarios

1) Show the companies who owns Access_Yes & Excel_No

Above should display 2 orgs (1 and 2 qualify for this scenario)

2) Show the companies who owns SqlServer_yes & SqlServer_Ye

Above query should display 0 orgs(no org qualifies)

Could you please suggest me thtat is my above design wrong or is it too hard to ahieve from cube? Is there any alogorithm this can solve above problem ?

I would really appreciate if you could answer to above problem ?

You can design your cube with dimensions for Org and Product (and optionally Segment and SubSegment) and then create a row count measure. Then you would query for Orgs and use NONEMPTYCROSSJOIN to filter by products.

Something like:

SELECT NONEMPTYCROSSJOIN(NONEMPTYCROSSJOIN([Org].Members, {[Product].[Access_Yes]}, 1) {[Product].[Excel_No], 1) ON COLUMNS,

{} ON ROWS

FROM [MyCube]