Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to read file having \x01 delimited

Hi,
I am trying to read files having \x01 delimited but I am getting error as invalid excape. Please help.
THank you.
Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi,
Could you please show us some fragment of your input file so that we can know your situation more precisely.
Best regards
Sabrina
Anonymous
Not applicable
Author

The delimiter in the tFileInputDelimited as a Java String. What ever is necessary to declare your delimiter as Java String is the right thing to setup the component.
Use that as field delimiter:
String.valueOf(Character.toChars(01))
_AnonymousUser
Specialist III
Specialist III

Hi,
Following are some sample records of the file -
50882013-05-28114
50882013-06-11135
50882013-06-26175
50882013-07-01141
50882013-07-02181
50882013-07-0311
50882013-07-03125
50882013-07-03131
50882013-07-03171
50882013-07-0571
"\x01" is an invisible delimiter which cant be typed from keyboad. this file is generated by Ab Initio and we are trying to read this file but we are not able to. Here is the file format -
record
utf8 string("\x01", maximum_length=4) whse /*VARCHAR(4)*/;
date("YYYY-MM-DD")("\x01") date_time /*DATE*/;
decimal("\x01") date_hours /*INTEGER*/;
decimal("\x01") cartoncount /*INTEGER NOT NULL*/;
string(1) newline = "\n";
end
Please help me on this.
Thanks,
Madhusudan
Anonymous
Not applicable
Author

can you show us hexadecimal view of record,
Anonymous
Not applicable
Author

To read the AbI file delimited by Ctrl+A, you can use "\001" as field delimiter.

Anonymous
Not applicable
Author

Is this problem resolved ?

 I'm asking because I've to deal with similar scenario where I need to replace all \x01 in data by empty string. Please suggest.

Anonymous
Not applicable
Author

you can use replace function

myValue.replaceAll("\u0000", "")

myValue.replaceAll("\001", "")