cancel
Showing results for 
Search instead for 
Did you mean: 

How to load data containing non printable character into file

0 Kudos

I have a flat file with NUL characters. I want to load data from this file. The data gets cut off once the NUL is encountered. How to load the file without losing any data. NUL is represented as `0 in powerShell. Below is a screen shot from notepad++. This NUL character is not seen on Windows notepad.

In the above screen shot the Line 1 and Line 2 gets cut off after the NUL part (' Second part' does not get loaded). The Line 3 is fully loaded.

Thank You.

jmuiruri
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @mirunalini.seshadri,

Could you paste the sample dataset instead of screenshot, this will help test privately.

BR,

Joe

Accepted Solutions (0)

Answers (1)

Answers (1)

RichS
Participant
0 Kudos

Try using the replace_substr function. Example: replace_substr(YourColumnName,chr(0),'')

0 Kudos

Unfortunately, I am not able to get that far. The data does not load from the flat file to the query transform after it encounters NUL for that row. The load will continue to the next row.

Thanks

Miru

RichS
Participant
0 Kudos

What is the setting for "Code page" under "Locale" for your file format? Have you tried changing it to something like utf-8 to see if that makes a difference?