Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication of records in pentaho CDA ouput. #232

Open
rniaz opened this issue Aug 2, 2017 · 3 comments
Open

Duplication of records in pentaho CDA ouput. #232

rniaz opened this issue Aug 2, 2017 · 3 comments

Comments

@rniaz
Copy link

rniaz commented Aug 2, 2017

Hi,
I am working on pentaho CDA document to fetch data. Problem I am facing is that when I write MDX query in CDA document there is row duplication. When I use same query in Saiku then single row is returned, but in case of CDA there are duplication of row.
Following is my MDX query.

WITH
SET [~Time_Time.Default_Year] AS
Exists({[Time.Default].[Year].Members}, [~Time_Time.Default_Day])
SET [~Time_Time.Default_Month] AS
Exists({[Time.Default].[Month].Members}, [~Time_Time.Default_Day])
SET [~Time_Time.Default_Day] AS
{[Time.Default].[${selectedYear}].[${selectedMonth}].[${selectedDay}]}
SET [~ROWS_Time_Time.Default] AS
Hierarchize({[~Time_Time.Default_Year], [~Time_Time.Default_Month], [~Time_Time.Default_Day]})
SET [~Client_Client_ClientId] AS
{[Client].[${ClientId}]}
SET [~Client_Client_ClientName] AS
Exists({[Client].[ClientName].Members}, [~Client_Client_ClientId])
SET [~ROWS_Client_Client] AS
Hierarchize({[~Client_Client_ClientId], [~Client_Client_ClientName]})
SET [~ROWS_UserStatus_UserStatus] AS
{[UserStatus].[UserStatusName].Members}
SET [~ROWS_UserType_UserType] AS
{[UserType].[UserType].Members}
SELECT
NON EMPTY {[Measures].[NewAddedProfiles], [Measures].[TotalProfileCount], [Measures].[UpdateProfileCount]} ON COLUMNS,
NON EMPTY NonEmptyCrossJoin([~ROWS_Time_Time.Default], NonEmptyCrossJoin([~ROWS_Client_Client], NonEmptyCrossJoin([~ROWS_UserStatus_UserStatus], [~ROWS_UserType_UserType]))) ON ROWS
FROM [UserProfilebyClient]

following is result out put in CDA document
error

@pamval
Copy link
Contributor

pamval commented Aug 2, 2017

Use BandedMode = compact. Something like:

<DataAccess access="public" connection="mdxQuery" id="mdxQuery" type="mdx"> <Name>mdxQuery</Name> <BandedMode>compact</BandedMode>

@rniaz
Copy link
Author

rniaz commented Aug 3, 2017

I have also tried this tag compact in connection, but there is no difference in output.

@pamval
Copy link
Contributor

pamval commented Aug 3, 2017

what version of Pentaho are you using? There was a bug like that once, but it has been fixed for years now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants