Task/SplitJoinLineTask.php
protected function initializeIterator(ProcessState $state): \Iterator
    {
        $originalLine = $state->getInput();
        $options = $this->getOptions($state);

        $lineCopy = $originalLine;
        foreach ($options['split_columns'] as $splitColumn) {
            unset($lineCopy[$splitColumn]);
        }

        $outputLines = [];
        foreach ($options['split_columns'] as $column) {
            if (!array_key_exists($column, $originalLine)) {
                throw new \UnexpectedValueException("Missing column {$column}");
            }
            $columnValues = explode($options['split_character'], $originalLine[$column]);
            foreach ($columnValues as $columnValue) {
                $outputLine = $lineCopy;
                $outputLine[$options['join_column']] = $columnValue;
                $outputLines[] = $outputLine;
            }
        }

        return new \ArrayIterator($outputLines);
    }
protected function initializeIterator(ProcessState $state): \Iterator
    {
        $originalLine = $state->getInput();
        $options = $this->getOptions($state);

        $lineCopy = $originalLine;
        foreach ($options['split_columns'] as $splitColumn) {
            unset($lineCopy[$splitColumn]);
        }

        $outputLines = [];
        foreach ($options['split_columns'] as $column) {
            if (!array_key_exists($column, $originalLine)) {
                throw new \UnexpectedValueException("Missing column {$column}");
            }
            $columnValues = explode($options['split_character'], $originalLine[$column]);
            foreach ($columnValues as $columnValue) {
                $outputLine = $lineCopy;
                $outputLine[$options['join_column']] = $columnValue;
                $outputLines[] = $outputLine;
            }
        }

        return new \ArrayIterator($outputLines);
    }
@param ProcessState $state

@return \Iterator