Skip to main content
Stefi
Silver ⭐️⭐️
June 18, 2021
Solved

Nifi ConvertExcelToCSVProcessor - broken pipe separator

Hello,

I have a file in .xlsx format that needs to be transofmerd to .csv format with broken pipe as separator. When I enter broken pipe (¦) as Value Separator in ConvertExcelToCSVProcessor, in CSV file appears "?" as separator instead of "¦". Is there a way to convert .xlsx to .csv with broken pipe delimiter?

aakulov
aakulovAnswer
Platinum ⭐️
June 18, 2021

Oh, I thought you had broken pipe in your Excel file, but this makes more sense. Thanks for clarifying. 

 

Do you need to use broken pipe delimiter on the output because the target process only accepts that character as the delimiter? Seems strange that you'd use broken pipe for a csv file. 

 

You can have ConvertExcelToCSVProcessor write out a simple comma-separated format. Then use a ReplaceTest processor to replace delimiter commas with your broken pipe hex code (see example here). Will that work for you?

7 replies

aakulov
Platinum ⭐️
Platinum ⭐️
June 18, 2021

Hi @Stefi ,

 

It could be as simple as setting the Include Trailing Delimiter parameter to False in your NiFi processor. Then NiFi should not include any delimiter at the end of each CSV record. See this documentation page for ConvertExcelToCSVProcessor. 

 

Hope this helps you out.

 

Regards,

Alex

Translate
Stefi
StefiAuthor
Silver ⭐️⭐️
June 18, 2021

Hi @aakulov ,

Thanks for answer.

I just checked and this parameter was set to  false, as you can see at the picture. When i use a regular pipe | the csv file is ok, but when when I use broken pipe, I get ? as separator between fields in one record, instead of ¦

Stefi_0-1624038997070.png

 

Translate
aakulov
Platinum ⭐️
Platinum ⭐️
June 18, 2021

@Stefi , could you please provide an example of what one input record looks like and what you want the output CSV record to look like, and also what output you are getting right now? That will help us understand what the problem you are facing is. 

Translate