Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: GROUP BY dont work properly

  1. #1
    Join Date
    Oct 2016
    Posts
    24

    Default GROUP BY dont work properly

    Hi,
    i have a:

    SORT_TRASF->GROUPBY->UNIQUE_ROWS

    but group by dont seem work correclty:

    SORT:
    Fieldname Ascending Case sensitive compare? Presorted?
    cdc_served_imei_enel_u Y N N
    cdc_served_msisdn_u Y N N
    dta_fine_validita_u Y N N
    fk_plmn_u Y N N
    cdc_served_imsi_u Y N N
    fln_presenza_enel_u Y N N
    fln_presenza_ti_billing_u Y N N
    fln_validita_u Y N N
    fk_audit_inserimento_var_u Y N N
    fk_audit_aggiornamento_var_u Y N N
    pk_time_u Y N N

    GROUP BY:
    Group field
    dta_fine_validita_u
    fk_plmn_u
    cdc_served_imsi_u
    fln_presenza_enel_u
    fln_presenza_ti_billing_u
    fln_validita_u
    fk_audit_inserimento_var_u
    fk_audit_aggiornamento_var_u
    pk_time_u

    Aggregates:
    Name Subject Type Value
    cdc_served_imei_enel_first cdc_served_imei_enel_u First value
    cdc_served_msisdn_first cdc_served_msisdn_u First value

    but: cdc_served_imei_enel_first cdc_served_imei_enel_u First value <- dont work infact i have after this step (Preview mode):

    dta_fine_validita_u fk_plmn_u cdc_served_imsi_u fln_presenza_enel_u fln_presenza_ti_billing_u fln_validita_u fk_audit_inserimento_var_u fk_audit_aggiornamento_var_u pk_time_u cdc_served_imei_enel_first cdc_served_msisdn_first
    2999/12/31 00:00:00 9 222420000001073 1 0 1 20161214154500 20161214154500 482400 220645840014324 393211001073

    2999/12/31 00:00:00 9 222420000001073 1 0 1 20161214154500 20161214154500 482400 013214008445060 393211001073




    Where is my error?
    thanks
    Regards
    Giusepp
    Last edited by enaud84; 12-14-2016 at 10:56 AM.

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    You need to put your grouping columns at the beginning of your sort order in the sort rows step.

    If you have:
    colA | colB | Colc
    1 | B | something
    1 | D | what
    2 | C | else

    If you are sorting on ColB, and then grouping on ColA, you will end up with 3 groups.

  3. #3
    Join Date
    Oct 2016
    Posts
    24

    Default

    SO same order in SORT TRF and GROUPBY TRF
    thanks

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.