Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

배열 원소와 위치를 행으로 펼치기

항목값
화면 이름Explode array with position
식별자explodeArrayWithPositionV2
지원 실행 방식Batch, Streaming
범주배열 (Array)
반환 자료형Struct<Optional[position]:Integer, Optional[element]:T>

배열 원소마다 행을 만들고, 원소의 상대 위치와 원소 값을 구조체로 반환합니다.

입력 인자

이름지정 여부자료형의미와 조건
Array필수Expression<Array<T>>행으로 펼칠 값의 배열입니다.
Keep empty / null arrays선택Literal<Boolean>true이면 빈 배열과 null도 출력에 null로 남깁니다. false이면 해당 항목을 제외합니다.

자료형 변수의 범위

  • T는 AnyType 범위의 자료형을 받습니다.

입출력 예시

예시 1: 기본 동작

인자 값:

  • Array: array
  • Keep empty / null arrays: null

입력 테이블:

array
[ one, two, three ]
[ four, five ]

출력 테이블:

array
{
 element -> one,
 position -> 1,
}
{
 element -> two,
 position -> 2,
}
{
 element -> three,
 position -> 3,
}
{
 element -> four,
 position -> 1,
}
{
 element -> five,
 position -> 2,
}

예시 2: 경계 조건

인자 값:

  • Array: array
  • Keep empty / null arrays: false

입력 테이블:

array
[ one, two, three ]
[ ]
[ four, five ]
[ ]

출력 테이블:

array
{
 element -> one,
 position -> 1,
}
{
 element -> two,
 position -> 2,
}
{
 element -> three,
 position -> 3,
}
{
 element -> four,
 position -> 1,
}
{
 element -> five,
 position -> 2,
}

예시 3: 경계 조건

인자 값:

  • Array: array
  • Keep empty / null arrays: true

입력 테이블:

array
[ one, two, three ]
[ ]
[ four, five ]
[ ]

출력 테이블:

array
{
 element -> one,
 position -> 1,
}
{
 element -> two,
 position -> 2,
}
{
 element -> three,
 position -> 3,
}
{
 element -> null,
 position -> null,
}
{
 element -> four,
 position -> 1,
}
{
 element -> five,
 position -> 2,
}
{
 element -> null,
 position -> null,
}