Icon

20230521 Pikairos Parallel Chunk Loop not Working if transposing or pivoting a table

This workflow shows how to use a -Parallel Chunk Loop- node if chunk tables arriving to the -Chunk Loop End- node don't have the same number of columns after pivoting or transposing tables.
This workflows answers question asked by Gavin Attard in Topic number 67250 posted in the KNIME forum.

Problem:Transposed or pivoted chunks of different sizes cannotbe concatenated using a Parallel Chunk Loop. Solution:Transposed or pivoted chunks of different sizes must benormalized before concatenating them when using aParallel Chunk Loop. 1 column datawith 100 RowsForce to have8 Parallel ChunksNode 3Transpose Table.Table has sometimes13 rows and others 12 rowsper chunk !Transpose Table.Table has sometimes13 rows and others 12 rowsper chunk !1 column datawith 100 RowsForce to have8 Parallel ChunksHere the Tablescan be concatenatedbecause they havethe same number ofColumnsNode 10Create Dummy Tablewith the right finalNumber of Rows:13 rowsReset RowIDsTranspose Table.Table with 13 rowsNow the Tablehas the Right MaximumNumber of Columnsafter TransposingRandom NumbersGenerator ParallelChunk Start Parallel Chunk End Transpose Transpose Random NumbersGenerator ParallelChunk Start Parallel Chunk End Parallel Chunks Empty Table Creator RowID Transpose Concatenate Problem:Transposed or pivoted chunks of different sizes cannotbe concatenated using a Parallel Chunk Loop. Solution:Transposed or pivoted chunks of different sizes must benormalized before concatenating them when using aParallel Chunk Loop. 1 column datawith 100 RowsForce to have8 Parallel ChunksNode 3Transpose Table.Table has sometimes13 rows and others 12 rowsper chunk !Transpose Table.Table has sometimes13 rows and others 12 rowsper chunk !1 column datawith 100 RowsForce to have8 Parallel ChunksHere the Tablescan be concatenatedbecause they havethe same number ofColumnsNode 10Create Dummy Tablewith the right finalNumber of Rows:13 rowsReset RowIDsTranspose Table.Table with 13 rowsNow the Tablehas the Right MaximumNumber of Columnsafter TransposingRandom NumbersGenerator ParallelChunk Start Parallel Chunk End Transpose Transpose Random NumbersGenerator ParallelChunk Start Parallel Chunk End Parallel Chunks Empty Table Creator RowID Transpose Concatenate

Nodes

Extensions

Links