source(output( issues as (value as string)[], maxresults as boolean, names as (customfield_123 as string, customfield_234 as string, customfield_345 as string, resolution as string, votes as (has_Voted as boolean, self as string, votes as boolean)) ), useSchema: false, allowSchemaDrift: true, validateSchema: false, ignoreNoFilesFound: false, format: 'json', fileSystem: 'data', folderPath: 'input', fileName: 'AmarFlatten.json', documentForm: 'singleDocument') ~> source1 source1 select(mapColumn( each(names,match(startsWith(name, "customfield_"))), maxresults ), skipDuplicateMapInputs: false, skipDuplicateMapOutputs: true) ~> select1 select1 unpivot(output( key as string, value as string ), ungroupBy(maxresults), lateral: false, ignoreNullPivots: false) ~> unpivot1 unpivot1 select(mapColumn( key, value ), skipDuplicateMapInputs: true, skipDuplicateMapOutputs: true) ~> select2 select2 sink(allowSchemaDrift: true, validateSchema: false, format: 'delimited', fileSystem: 'data', folderPath: 'out', columnDelimiter: ',', escapeChar: '\\', quoteChar: '\"', columnNamesAsHeader: false, partitionFileNames:['unpivot'], umask: 0022, preCommands: [], postCommands: [], skipDuplicateMapInputs: true, skipDuplicateMapOutputs: true, partitionBy('hash', 1)) ~> sink1