How to use the field cardinality repeating in Render-CSV BW step?

379 Views Asked by At

I am building a generic CSV output module with a variable number of columns. The DataFormat in BW (5.14) lets you define repeating item and thus offers a list of items that I could use to map data to in the RenderCSV step. But when I run this with data for >> 1 column (and loopings) only one column is generated.

Is the feature broken or do I use it wrongly?

Alternatively I defined "enough" optional columns in the data format and map each field separately - no really generic solution.

1

There are 1 best solutions below

2
David Abragimov On

Looks like In BW 5, when using Data Format and Parse Data to parse text, repeating elements isn’t supported. Please see https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-27133

The workaround is to use Data Format resource, Parse Data and Mapper activities together. First use Data Format and Parse Data to parse the text into the xml where every element represents one line of the text. Then use Mapper activity and tib:tokenize-allow-empty XSLT function to tokenize every line and get sub-elements for each field in the lines.

The link has also attached workaround implementation

enter image description here