Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
eladberko
Contributor II
Contributor II

field name with space char ' '

hi!

i need to store a table in .CSV, but some of the fields must start with space char ' '.

in the example i will need to replace all '#' with ' ', and store the table in csv format.

every time that i do that - QS remove the blanks automatically.

[export]:
LOAD * INLINE
[
#HEADER_1|#HEADER_2|HEADER_3|HEADER_4
#Field_1|Field_2|Field_3|Field_4
] (DELIMITER IS '|');

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@eladberko  try below

rename_fields:
mapping Load FieldFrom,
     Replace('['&FieldFrom&']','#',chr(160)) as FieldTo;
Load * Inline [
FieldFrom
#HEADER_1
#HEADER_2
#HEADER_3 ];

[export]:
LOAD * INLINE
[
#HEADER_1|#HEADER_2|#HEADER_3
] (DELIMITER IS '|');

Rename Fields using rename_fields;

View solution in original post

1 Reply
Kushal_Chawda

@eladberko  try below

rename_fields:
mapping Load FieldFrom,
     Replace('['&FieldFrom&']','#',chr(160)) as FieldTo;
Load * Inline [
FieldFrom
#HEADER_1
#HEADER_2
#HEADER_3 ];

[export]:
LOAD * INLINE
[
#HEADER_1|#HEADER_2|#HEADER_3
] (DELIMITER IS '|');

Rename Fields using rename_fields;