4.1.1.11.ConcatAndReshape_manual.md 2.28 KB
Newer Older
HooYoungAhn's avatar
HooYoungAhn committed
---
html:
  toc: true
  offline: true
export_on_save:
  html: true
---
# Concat And Reshape Operator
---
## Operator 설명
- 여러 개의 column을 연결하여 하나의 새로운 column을 생성한다.
## Operator 파라미터 설명
- selectedColumnId: 선택할 column ID  (repeated)
- delimiter: 연결할 column 간의 구분할 구분 기호(required)
- valueColName: 새롭게 생성된 칼럼 이름 (required)
- condition: 연결되는 column의 조건. Enum(KEEP_ORIGINAL_AND_RESULT,REPLACE_SELECTED_WITH_RESULT, REFINEMENT_RESULT_ONLY)(required)
## Operator 모듈 테스트 결과

### 입력 데이터
PRCS_YEAR|PRCS_MON|PRCS_DAY|PRCS_HH|PRCS_MIN|
|:---:|:---:|:---:|:---:|:---:|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|00|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|
2015|09|01|00|05|

### 결과 데이터
PRCS_YEAR|PRCS_MON|PRCS_DAY|PRCS_HH|PRCS_MIN|DATE_TIME|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|00|2015_09_01_00_00|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|
2015|09|01|00|05|2015_09_01_00_05|

- column(0~4)들을 연결하여 하나의 새로운 DATE_TIME column(5)을 갖는 결과 DataFrame을 생성하였다.
- parameter는 다음과 같이 설정하였다.


```scala
val concatInfo = ReshapeWithConcatInfo.newBuilder()
.addSelectedColumnId(0)
.addSelectedColumnId(1)
.addSelectedColumnId(2)
.addSelectedColumnId(3)
.addSelectedColumnId(4)
.setDelimiter("_")
.setValColName("DATE_TIME")
.setCondition(KEEP_ORIGINAL_AND_RESULT)
.build
```