Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

계층별 Rollup 집계

항목값
화면 이름Rollup
식별자rollUpV1
지원 실행 방식Batch, Faster
범주집계 (Aggregate)

입력 데이터를 여러 세부 수준에서 집계하여 중간 집계와 상위 집계를 함께 제공합니다.

입력 인자

이름지정 여부자료형의미와 조건
Aggregations필수List<Expression<AnyType>>데이터셋에 수행할 집계 목록입니다.
Dataset필수TableRollup을 수행할 데이터셋입니다.
Rollup columns필수List<Column<AnyType>>집계 시 Rollup할 열 목록입니다. 비어 있으면 Rollup을 적용하지 않습니다.

입출력 예시

예시 1: 기본 동작

인자 값:

  • Aggregations: [
    alias(
     alias: max_price,
     expression:
    max(
     expression: price,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupBaseCase
  • Rollup columns: [city]

입력:

citymodelpricestore
Londonnew phone900.0MegaMart
Londonnew phone850.75AA
Londonnew phone870.75ABC Zone
San Francisconew phone1000.0Prescos
San Francisconew phone950.25XZY Force
San Francisconew phone1105.7Phone Mart
LondonforestX 20750.1MegaMart
LondonforestX 20690.0AA
LondonforestX 20730.0ABC Zone
San FranciscoforestX 20890.4Prescos
San FranciscoforestX 20900.1XZY Force
San FranciscoforestX 201050.75Phone Mart

출력:

citymax_price
London900.0
San Francisco1105.7
null1105.7

예시 2: 기본 동작

인자 값:

  • Aggregations: [
    alias(
     alias: mean_price,
     expression:
    mean(
     expression: price,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupBaseCase
  • Rollup columns: [city, model]

입력:

citymodelpricestore
Londonnew phone900.0MegaMart
Londonnew phone850.75AA
Londonnew phone870.75ABC Zone
San Francisconew phone1000.0Prescos
San Francisconew phone950.25XZY Force
San Francisconew phone1105.7Phone Mart
LondonforestX 20750.1MegaMart
LondonforestX 20690.0AA
LondonforestX 20730.0ABC Zone
San FranciscoforestX 20890.4Prescos
San FranciscoforestX 20900.1XZY Force
San FranciscoforestX 201050.75Phone Mart

출력:

citymodelmean_price
Londonnew phone873.8333333333334
LondonforestX 20723.3666666666667
Londonnull798.6
San Francisconew phone1018.65
San FranciscoforestX 20947.0833333333334
San Francisconull982.8666666666667
nullnull890.7333333333335

예시 3: 기본 동작

인자 값:

  • Aggregations: [
    alias(
     alias: max_price,
     expression:
    max(
     expression: plan_prices,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupComplexCase
  • Rollup columns: [model]

입력:

citymodelplan_pricesstores
Londonnew phone[ 900.0, 1080.23, 899.99 ]MegaMart
Londonnew phone[ 850.75, 800.78, 999.99 ]AA
Londonnew phone[ 870.75, 775.0, 804.48 ]ABC Zone
San Francisconew phone[ 910.0, 1030.23, 1100.5 ]Prescos
San Francisconew phone[ 1020.0, 989.99, 1130.0 ]XZY Force
San Francisconew phone[ 1020.0, 1065.25, 1110.99 ]Phone Mart
LondonforestX 20[ 738.5, 701.25, 834.0 ]MegaMart
LondonforestX 20[ 703.75, 821.0, 712.5 ]AA
LondonforestX 20[ 692.0, 787.5, 841.75 ]ABC Zone
San FranciscoforestX 20[ 1003.25, 997.75, 893.5 ]Prescos
San FranciscoforestX 20[ 981.5, 872.25, 1035.0 ]XZY Force
San FranciscoforestX 20[ 928.0, 995.25, 1098.5 ]Phone Mart

출력:

modelmax_price
new phone[ 1020.0, 1065.25, 1110.99 ]
forestX 20[ 1003.25, 997.75, 893.5 ]
null[ 1020.0, 1065.25, 1110.99 ]

예시 4: null 처리

인자 값:

  • Aggregations: [
    alias(
     alias: max_price,
     expression:
    max(
     expression: price,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupNullCase
  • Rollup columns: [city, model]

입력:

citymodelpricestores
Londonnew phonenullMegaMart
Londonnew phone850.75AA
Londonnew phone870.75ABC Zone
San Francisconew phonenullPrescos
San Francisconew phonenullXZY Force
San Francisconew phonenullPhone Mart
LondonforestX 20750.1MegaMart
LondonforestX 20690.0AA
LondonforestX 20nullABC Zone
San FranciscoforestX 20890.4Prescos
San FranciscoforestX 20nullXZY Force
San FranciscoforestX 201050.75Phone Mart

출력:

citymodelmax_price
Londonnew phone870.75
LondonforestX 20750.1
Londonnull870.75
San Francisconew phonenull
San FranciscoforestX 201050.75
San Francisconull1050.75
nullnull1050.75

예시 5: 경계 조건

인자 값:

  • Aggregations: [
    alias(
     alias: mean_price,
     expression:
    mean(
     expression: price,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupBaseCase
  • Rollup columns: []

입력:

citymodelpricestore
Londonnew phone900.0MegaMart
Londonnew phone850.75AA
Londonnew phone870.75ABC Zone
San Francisconew phone1000.0Prescos
San Francisconew phone950.25XZY Force
San Francisconew phone1105.7Phone Mart
LondonforestX 20750.1MegaMart
LondonforestX 20690.0AA
LondonforestX 20730.0ABC Zone
San FranciscoforestX 20890.4Prescos
San FranciscoforestX 20900.1XZY Force
San FranciscoforestX 201050.75Phone Mart

출력:

mean_price
890.7333333333335

예시 6: 경계 조건

인자 값:

  • Aggregations: [
    alias(
     alias: max_price,
     expression:
    max(
     expression: price,
    ),
    )]
  • Dataset: ri.foundry.main.dataset.rollupEmptyCase
  • Rollup columns: [city, model]

입력:

citymodelpricestore

출력:

citymodelmax_price