How to store text file with Linux line break (LF) character from Qlik reload scriptArticle Number: 000077158 | Last Modified: 2019/06/19
Documentation of the EXECUTE statement is on the product help site at https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Execute.htm (Qlik Sense) and https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Execute.htm (QlikView)
For example, the following piece of script stores data into a CSV file and call a PowerShell script to convert CRLF (Windows) to LF (Linux) in the text file:
LOAD * INLINE [
Col1, Col2, Col3
1, A001, 'This is sample text 1'
2, B002, 'This is, sample text 2'
3, C003, This is sample text 3
Store TestData INTO [C:\Temp\test.csv] (txt);
EXECUTE powershell.exe C:\Temp\test.ps1;
Content of script file test.ps1 :
(Get-Content C:\Temp\test.csv -Raw).Replace("`r`n","`n") | Set-Content C:\Temp\test.csv -Force
- QlikView all versions
- Qlik Sense all versions
Have a Question?
Search Qlik's Support Knowledge database or request assisted support for highly complex issues.Submit a case
Experiencing a serious issue, please contact us by phone. View phone numbers and hours by region.