Pivot Operator


Operator 설명

Operator 파라미터 설명

Operator 모듈 테스트 결과

입력 데이터

PRCS_YEAR PRCS_MON PRCS_DAY PRCS_HH PRCS_MIN LINK_ID PRCS_SPD DATE_TIME
2015 09 01 00 00 1000000100 1.0 2015_09_01_00_00
2015 09 01 00 00 1000000200 2.0 2015_09_01_00_00
2015 09 01 00 00 1000000300 3.0 2015_09_01_00_00
2015 09 01 00 00 1000000400 4.0 2015_09_01_00_00
2015 09 01 00 00 1000000500 5.0 2015_09_01_00_00
2015 09 01 00 00 1000000600 6.0 2015_09_01_00_00
2015 09 01 00 00 1000000100 8.0 2015_09_01_00_05
2015 09 01 00 00 1000000200 9.0 2015_09_01_00_05
2015 09 01 00 00 1000000300 10.0 2015_09_01_00_05
2015 09 01 00 05 1000000400 11.0 2015_09_01_00_05
2015 09 01 00 05 1000000500 12.0 2015_09_01_00_05
2015 09 01 00 05 1000000600 13.0 2015_09_01_00_05

결과 데이터

DATE_TIME 1000000100 1000000200 1000000300 1000000400 1000000500 1000000600
2015_09_01_00_00 1.0 2.0 3.0 4.0 5.0 6.0
2015_09_01_00_05 8.0 9.0 10.0 11.0 12.0 13.0
val pivotInfo =PivotInfo.newBuilder()
    .selectedColumnName(5)://pivot 하기 위한 column
    .setgroupByColumn(7)://groupby 하기 위한 column
    .setvalueColumn(6)://value로 사용할 column
    .setMethod(PivotInfo.Method.AVG)
    .build
}