Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
eddysanchez
Partner - Creator
Partner - Creator

Load Web File dynamically

Hi all

For load a web file in Qlik Sense is mandatory to define the connection with the specific link?

I need to load a web file that the source is made by variables like that:

[https://domain.com/$(vYear)/$(vMonth)/File.XLS]

Any suggestion?

thank you

Att

Eddy

53 Replies
Michael_Tarallo
Employee
Employee

Hi Jochem,

Yes - though I have not tried it - there is a settings.ini file located here:

C:\ProgramData\Qlik\Sense\Engine

The file may be empty by default and is used for additional settings.

If you have an issue, please let me know.

Mike

Regards,
Mike Tarallo
Qlik
chrisbrain
Partner - Specialist II
Partner - Specialist II

Hi Mike,

Good to be speaking with you too, especially considering how familiar you are with our product.

I am still not quite clear on this 😕

Regarding:

So if a variable is used with the LIB statement such where the variable's values can be something like connection1 or connection2  - the actual connection names connection1 and connection2 must be defined to the correct data sources.

Can a variable, e.g. $(vSearchTerm), be passed through to a connection or would a connection need to be created for each possible/unique URL?

And:

Yes - you are correct, this will happen with the next minor update release, I am being told.

But it sounded from your initial message that this reversion itself would be temporary, i.e. that again soon after the default will revert to the current position of a 'LIB://' only approach in the script - is that also your understanding?

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
Michael_Tarallo
Employee
Employee

Hi Chris:

Can a variable, e.g. $(vSearchTerm), be passed through to a connection or would a connection need to be created for each possible/unique URL?

If not using the legacy mode AND only using LIB - then each Web File connection-type would need to be defined as shown in the previous reply. The variable could only be the connection name.

If using the Legacy mode - as set in the settings.ini - then you can use the same traditional approach with variables  as used with QlikView (the script that QVSource uses)

But it sounded from your initial message that this reversion itself would be temporary, i.e. that again soon after the default will revert to the current position of a 'LIB://' only approach in the script - is that also your understanding?

You are correct, I was not getting into too much detail. It would be temporary change until the full compatibility of connectors and variable support are available for Qlik Sense.

Regards,
Mike Tarallo
Qlik
chrisbrain
Partner - Specialist II
Partner - Specialist II

So this means that in the default case (when the default mode stabilizes) Qlik users will no longer be able to do something like this?

LET noRows = NoOfRows('Params');

   

for i=0 to $(noRows)-1

    

     let vParam = peek('id', $(i), 'Params');

    

     WebAPI:

     LOAD

        '$(vParam)' as Param,

        col1 as data1,

        col2 as data2

     FROM

     [https://server/api?param=$(vParam)] (XmlSimple, Table is [XXXXXX]

next

Without potentially complex/confusing settings file changes (which may not even be permitted by their organisation)?

This is something which is not only key to QVSource users, but also used commonly in our experience outside of QVSource, which is also evidenced by the OP.

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
Not applicable

In Qlik Sense Server v1.0, in the QMC under Configuration > Engine - edit that configuration and you'll find a checkbox that has a label of "Standard". Uncheck that option to provide the "legacy" mode for QlikView you're looking for. That updates the .ini so no need to manually edit a file.

chrisbrain
Partner - Specialist II
Partner - Specialist II

Can Qlik comment on the reason for this with respect to loading data from http end points?

The docs state:

For security reasons, Qlik Sense in standard mode does not support absolute or relative paths in the data load script or functions and variables that expose the file system.

However, since absolute and relative paths were supported in QlikView, it is possible to disable standard mode and use legacy mode in order to reuse QlikView load scripts.

Disabling standard mode can create a security risk by exposing the file system.

But this seems related to file system access, not web urls.

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
Michael_Tarallo
Employee
Employee

Hi Chris - all legacy type connectors (including file access and web urls - pre Qlik Sense) that have not been updated yet to take advantage of the new  connector architecture (which includes the ability to secure the data connectors with security rules) will fall under this category.

There is a new Web File connector as you can see - when created and used in Standard mode - the ability to create security rules is possible to control access and actions with the defined connections. When these connectors also allow variables to be passed to them, I could see the Legacy mode starting to fade out.

HTH

Mike

Regards,
Mike Tarallo
Qlik
chrisbrain
Partner - Specialist II
Partner - Specialist II

HI Mike,

So then regarding:

When these connectors also allow variables to be passed to them, I could see the Legacy mode starting to fade out.

Can we assume something like my earlier example will be possible, e.g.:

LET noRows = NoOfRows('Params');

  

for i=0 to $(noRows)-1

   

     let vParam = peek('id', $(i), 'Params');

   

     WebAPI:

     LOAD

        '$(vParam)' as Param,

        col1 as data1,

        col2 as data2

     FROM

     'lib://my api data'

next

Where the 'lib://my api data' will either be able to either access the script variables (e.g. vParam) or there will be some other mechanism to pass them through (i.e. it might not look exactly like the above)?

beeido.com - BI | Software | Qlik Integration Services
GitFirst - A CI/CD solution for Qlik Sense
Michael_Tarallo
Employee
Employee

Hi Chris - I will verify with PM

Mike

Regards,
Mike Tarallo
Qlik
jochem_zw
Partner Ambassador
Partner Ambassador

What Chris mentioned is what we absolutely need.

Passing variables is at the moment NOT possible with a LIB connection!

So we have to go back to legacy mode.