Ah! After checking my log file, which was located here:
I could see a specific error message:
2016-12-29 20:36:53 No qualified path for file: "../test.qvs"
2016-12-29 20:36:53 Execution Failed
2016-12-29 20:36:53 Execution finished.
By the way, it does work if I add the folder to my connections first, then use "lib:\\" notation:
Also worth noting that the same script will work in Qlikview with no problems:
Since Qlikview uses a "legacy" mode this reinforces the idea that "legacy mode" (StandardReload=0) is the fix I want;
Now my only concern is that the "standard mode vs legacy mode" documentation suggests that absolute paths wouldn't work..
to reuse QlikView load scripts that refer to absolute or relative file paths as well as library connections.
And yet, for me, absolute paths (as well as "lib paths") did work even in Qlik Sense with StandardReload=1
Qlik Sense distinguishes between legacy and standard mode, QlikView does not, only works with paths, not LIBs.
Indeed, in Qlik Sense, you can use LIBs pointing to a folder structure, or you can use a relative or absolute path, the latter as long as the legacy mode is enabled.
As for the issue of Desktop not reading the StandardReload = 0, since it is using an ini file, make sure Desktop is closed, then the modification is done in the ini file, then Desktop is open again.
Qlik Sense is very API-oriented; I love that. So with everything I learn in Qlik Sense , I ask, is there an API call for that, in case I need to automate it or build it into a bigger app?
For instance, to create a connection (so I can use the "lib://") notation, I can use CreateConnection.
Is there a way to modify Settings.ini (or whatever is the equivalent for a Server installation of Qlik Sense), specifically setting StandardReload=1 or StandardReload=0, using an API?
For instance, could this be it?
I don't think that would work in Desktop even if there is an endpoint for that, because although technically the Desktop is using a QIX engine, it does not listen to APIs by design (i.e: it is not a proper Qlik Sense server).
In the server, it is not possible (yet) to do it via API, as far as I know.
Ah, I see now, Absolute paths actually have NOT been working for me... they just haven't failed explicitly (they fail silently)
For example, if the contents of test.qvs are:
SET vTestQvsVal = fake_outer_newer_12_30_2016_2;
And I run this script:
The script load logs prints this line; i.e. it did NOT include test.qvs (absolute paths don't work in standard mode) NOR did it print an error about the problem:
2016-12-30 08:25:42 Execution finished.
But if I run this script instead, or in addition to the above:
The script load logs print this line; i.e. it DID include test.qvs:
2016-12-30 08:27:03 0031 SET vTestQvsVal = fake_outer_newer_12_30_2016_2
2016-12-30 08:27:03 Execution finished.
The fail itself, it seems it is not reading the right .ini file or ignoring the setting of StandardReload. It does work for me.
On a different note, you have posted this in the QlikView area, not the Qlik Sense section. I recommend you to move it there so more people or even Qlik Support can chime in.
mbaeyens -- I moved it, but now I can't reply to you directly...
Oh! I see Miguel's point: I didn't notice it literally says "fail silently":
- Include does not generate an error if the file cannot be found, it will fail silently.
Then I don't know why it "fails loudly" when I use a relative path:
"Data has not been loaded. Please correct the error and try loading again."
Not even using "." or "..", just directly looking inside working directory, exactly as shown on that documentation:
And the log shows:
2016-12-30 08:40:59 No qualified path for file: "abc.txt"
I think I have been carefully changing Settings.ini and restarting Qlik Sense, per your instructions. I'm convinced there is just inconsistent treatment of absolute path vs relative path until I hear more.
Yeah, in fact if I do use Must_Include, it gives me clear error message for absolute...
The following error occurred:
"$(INCLUDE= " cannot access the local file system in current script mode. Try including with LIB path
The error occurred here:
But still the same old message when I use relative:
Data has not been loaded. Please correct the error and try loading again.
(And in the log:
2016-12-30 08:46:52 No qualified path for file: "test.qvs")
Script mode means Standard Mode is still set to 1, or in other words, Qlik Sense is working in Standard Mode, therefore not accepting any references to the filesystem directly unless you create a LIB for it.
Do you happen to be using the "DIRECTORY" key in your script if you copied it from QlikView?
Yes I think I'm clear on StandardMode=1;
I can work in the constraints of StandardMode; i.e. just create a LIB.
I am not using a DIRECTORY keyword in my script; my script is only the one line I printed here.
However, it's an interesting idea, maybe I can see how DIRECTORY will affect the behavior I am seeing.
While I'm referring to a very specific version when copying the help:
In this case Qlik Sense 3.1, it could well be a bug in how Qlik Sense Desktop (not Enterprise) behaves with paths. Maybe it is worth checking with Qlik Support if that error is expected.
OK, I will try when I have time... Qlik Support has been helpful in the past.
You said "QDF"
Miguel Baeyens wrote:
Well, you shouldn't give up.
Lots of people are using Include in their script, and the QDF itself assumes that Include works as expected, so I would contact Qlik Support if what you see is not what you are expecting or not what it is documented in the official help.qlik.com site.
What is QDF? Qlikview Deployment Framework?
Yes, sorry, I try to not use acronyms in public sites so everybody knows what I'm talking about and I forgot this time, but you are right, QDF stands for Qlik Deployment Framework, which has been published in GitHub and which you can follow up in its own group in the Community for new updates, features, issues, comments, etc.:
And, slightly related, you can use relative paths in the Connections as shown in the attached screenshot.
The screenshot was taken from an app whose file is NOT located in the Qlik Sense App Directory, (i.e. C:\Somewhere\Else)
Therefore the screenshot also illustrates that the working directory for a Connections' relative path, will STILL/ALWAYS be the Qlik Sense App Directory;
excuse my interference here, i was looking for answers on how to use web connectors and since im using qlilk sense desktop i got to the point that i should change the standard reload in the settings to 0 so i can connect to the web link i got from the connector
1. am i on the right path?
2. the settings text file C:\Users\mena\Documents\Qlik\Sense \settings.ini only include the phrase [Settings 7] so what is going on here??
mena, I think in the Settings.ini; any line in square brackets, like:
Is a header. Its purpose is only to organize the actual values which appear on lines after its header, and before a different header.
So you can add a line beneath that, StandardReload=1 if you want. (I'm not sure the StandardReload will help you with "web connectors". I thought StandardReload is only related to "load scripts that refer to absolute or relative file paths as well as library connections." Let us know.)
Indeed, my settings.ini looks like this: