Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Aggregate tables

  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Default Aggregate tables

    Hi,
    I'm using Cmdrunner to create aggregate tables for my cube, but these tables are not used.
    My call MDX execute this query:

    SELECT "TIMES"."CALENDAR_YEAR_ID" AS "c0",
    SUM ("SALES_FACT"."SALES") AS "m0",
    SUM ("SALES_FACT"."QUANTITY") AS "m1",
    COUNT ("SALES_FACT"."DAY_KEY") AS "m2"
    FROM "OLAPTRAIN"."TIMES" "TIMES", "OLAPTRAIN"."SALES_FACT" "SALES_FACT"
    WHERE "SALES_FACT"."DAY_KEY" = "TIMES"."DAY_KEY"
    GROUP BY "TIMES"."CALENDAR_YEAR_ID"

    and with use of cmrunner I created this aggregation table:
    CREATE TABLE agg_c_YEAR_SALES_FACT (
    CALENDAR_YEAR_ID VARCHAR2(30) NOT NULL,
    QUANTITY NUMBER(10,2) NOT NULL,
    SALES NUMBER(10,2) NOT NULL,
    RIGHE DATE NOT NULL,
    fact_count INTEGER NOT NULL
    );

    INSERT INTO agg_c_YEAR_SALES_FACT(
    CALENDAR_YEAR_ID,
    QUANTITY,
    SALES,
    RIGHE,
    fact_count)
    SELECT
    "TIMES"."CALENDAR_YEAR_ID" AS "CALENDAR_YEAR_ID",
    sum("SALES_FACT"."QUANTITY") AS "QUANTITY",
    sum("SALES_FACT"."SALES") AS "SALES",
    count("SALES_FACT"."DAY_KEY") AS "DAY_KEY",
    COUNT(*) AS "fact_count"
    FROM
    "SALES_FACT" "SALES_FACT",
    "TIMES" AS "TIMES"
    WHERE
    "SALES_FACT"."DAY_KEY" = "TIMES"."DAY_KEY"
    GROUP BY
    "TIMES"."CALENDAR_YEAR_ID";


    Mondrian doesn't use this aggregated table . Why ? Do wrong I something ? I have enabled the read and use of aggregation table.

    Thanks a lot.
    Andrea






  2. #2
    Join Date
    Nov 2011
    Posts
    7

    Default

    Help me please !!
    Every my aggregated table is never used.

    Thanks
    Andrea

  3. #3

    Default

    What error you are facing in pentaho.log file?
    Last edited by herwinrayen; 12-14-2011 at 09:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.