I have reproduced this bug using data:
Row,Bill Code
1,A1|A2|A3
2,B12|B13|B14
and script:
source(output(
Row as short,
{Bill Code} as string
),
allowSchemaDrift: true,
validateSchema: false,
ignoreNoFilesFound: false,
format: 'delimited',
container: 'martin',
fileName: 'sample.csv',
columnDelimiter: ',',
escapeChar: '\\',
quoteChar: '\"',
columnNamesAsHeader: true) ~> origin
origgin derive(Code = split({Bill Code},'|')) ~> Split
Split foldDown(unroll(Code),
mapColumn(
Row,
Bill = Code
),
skipDuplicateMapInputs: false,
skipDuplicateMapOutputs: false) ~> Flatten1
I tried several permutations of names and flatten settings, in case something else was going on. However it looks like you are right, it is the name. This seems odd to me. I will let the developers know about this bug. Thank you for bringing it to our attention.