Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
thomaswrieck
Partner - Creator
Partner - Creator

put (txt, utf8, embedded labels, delimiter is '\t', msq) into a variable keeping ' around \t

Hi,

what I would like to achive is to fill a variable with (txt, utf8, embedded labels, delimiter is '\t', msq).

I have problems to keep the ' around \t . Does somebody know a solution for that ? I've already tried the following but this doesn't work. Also experimenting with chr(39) doesn't work ...

LET vConf_FormOpt='(txt, utf8, embedded labels, delimiter is ' & '\t' &' , msq)';

Thanks

Thomas

6 Replies
Miguel_Angel_Baeyens

Hello Thomas,

Use SET instead, since you don't want to store any evaluated formula (actually you want to keep the string as it is):

SET vTxtOptions = (txt, codepage is 1252, embedded labels, delimiter is ';', msq); LOAD id, name FROMC:\file.csv$(vTxtOptions);


Hope this helps

gandalfgray
Specialist II
Specialist II


Let vConf_FormOpt = '(utf8, txt, delimiter is ' & Chr(39) & '\t' & Chr(39) & ', embedded labels, msq)';

hope this helps

thomaswrieck
Partner - Creator
Partner - Creator
Author

Hi Miguel,

thanks for looking into this ... but this doesn't work either ...

regards

Thomas

Miguel_Angel_Baeyens

Thomas,

is working fine here, what error are you getting?

thomaswrieck
Partner - Creator
Partner - Creator
Author

Hi,

the following works :

SET vTxtOptions = (txt, utf8, embedded labels, delimiter is ',', msq);

$(vConf_GenType)_All_Facts:

LOAD

%Server,

ServerName,

ServerApplication,

ServerOS,

ServerOSType,

ServerDomain,

ServerImportanceLevel,

§F_IsWin,

§F_IsUnX,

ServerOSVersion,

ServerDescription,

ServerStatusInfo,

ServerLastCriticalEvent,

ServerNextEvent

FROM $(vConf_SourcePath)\$(vConf_GenType)_D_Server_update.$(vConf_GenType)

$(vTxtOptions);



While working on that I was checking the content of the variable via a textbox and withing this it wasn't displayed correctly. When checking the variable list in the client teh string was correctly set and is also working withing the script.

Thanks a lot !

Thomas

lcarlos_pe
Contributor III
Contributor III

I try the solution apointed by Miguel Angel and it works.

set v_tipo_arq_csv = (txt, utf8, embedded labels, delimiter is ',', msq);