Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
How can we make this relative path?
'\\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview\UAT\Config\KeyFile.txt';
Thanks in advance!
Cheers,
Varun
'..\' will use the parent folder of the current base folder. I've only used a single dot '.\'
But only stating the file name should also work:
'KeyFile.txt'
If not, your current base folder is not the one you are assuming, or the file is not located at that place.
I am missing the path in your request that you want to use as base for the relative path, i.e. the start pointing of the relative path. Or in other words: "relative path to what"?
Relative to
'\\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview\UAT\Config
If you are asking about making relative paths, then here is how you do it:
Directory \\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview\UAT\Config;
Then in your load script, you can directly put the file name:
LOAD
*
FROM KeyFile.txt;
Another example is that we can only specify the directory to include upto DQ_Qlikview folder:
Directory \\hbeu.adroot.hsbc\dfsroot\GB002\GDMP\01.GDMP\04. Data Quality\25. Data Quality Metrics & Reporting\98. Reporting\DQ_Qlikview;
In the load script, we put ..\ to move into the next folder:
LOAD
*
FROM ..\..\KeyFile.txt;
Pretty much ..\ helps you move up and down in the folder hierarchy.
Hope this helps.
So the file is located within the base folder?
'.\KeyFile.txt'
Trying something like this. But it is not working
Trying something like this. But it is not working
LET vKeyFileLocation = '..\KeyFile.txt';
'..\' will use the parent folder of the current base folder. I've only used a single dot '.\'
But only stating the file name should also work:
'KeyFile.txt'
If not, your current base folder is not the one you are assuming, or the file is not located at that place.
Hi Swuehl,
Can you kndly explain this?
IF ISNULL(FileTime('$(vKeyFileLocation)')) = -1 THEN
CALL WriteMessageToLog('Expected Key File is not in the expected Location', '$(vKeyFileLocation)', 'KEY FILE');
LET keyFile_Load_Err = 1;
EXIT SCRIPT;
ENDIF
FileTime() will return NULL() if the given file does not exist (i.e. is not found in the specified location).
If the file is not found, call the sub routine WriteMessageToLog, set variable keyFile_Load_Err to 1 and exit script.
If the file is found, proceed with the script after ENDIF statement.