Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
pascalschwegler
New Contributor III

How to load data from web file dynamically

Hi Community,

I would like to import data dynamically from company.info, so I have changed my settings.ini to StandardReload = 0.

Now I can import dynamically right, but I cat message: 'Not found'

My script is shown below:

VENDOR:

LOAD

     right('00000'&KVKNO&'0000',12) as KVKNO,

FROM [lib://Data/VENDOR.csv]

(txt, codepage is 28591, embedded labels, delimiter is '~', msq)

where KVKNO <> '';

KVKCOUNTER:

LOAD DISTINCT KVKNO as KVKNUM,

RowNo() as RowNo

RESIDENT VENDOR;


let kvkCounterRows = NoOfRows('KVKCOUNTER');


for i=1 to 10

//for i=1 to $(kvkCounterRows)


let KVKNO = peek('KVKNUM',$(i),KVKCOUNTER);

KVK:

LOAD

    @1,

    @2

FROM [https://company.info/id/$(KVKNO)]

(html, codepage is 1252, no labels, table is @1)

where @1 = 'KvK';


I hope anybody can help me.

Thank you in advance.

Grtz, Pascal


8 Replies
sandeep_roy
Contributor II

Re: How to load data from web file dynamically

Check your settings.ini file , place the StandardReload=0 just below settings7. Restart desktop or click engine.

pascalschwegler
New Contributor III

Re: How to load data from web file dynamically

I would like to import data dynamically from company.info, so I have changed my settings.ini to StandardReload = 0.

sandeep_roy
Contributor II

Re: How to load data from web file dynamically

That' fine Pascal. Just check in that file whether you have placed it rightly or not.

You have to Peek @1 from that table and set to vURL.

If that is fine then try to set your URL as vURL='https://company.info/id/$(KVKNO‌' @1

Then Load  the query at the end  FROM $(vURL).

I hope it will help you.. otherwise give the screenshot of your settings.ini file.


pascalschwegler
New Contributor III

Re: How to load data from web file dynamically

This is Settings.ini

[Settings 7]

StandardReload=0

InterfaceLanguage=English

NumberOfDocuments=0

DocumentTimeout=60

sandeep_roy
Contributor II

Re: How to load data from web file dynamically

Alright Pascal. This seems fine.

But what actual error you are getting after load data?

pascalschwegler
New Contributor III

Re: How to load data from web file dynamically

Thank you for your reply. Unfortunately I get errors "not found"

Now my script is as follows:

Set ErrorMode = 0;

Set vUrl = 'https://company.info/id/$(KVKNO)';


Directory;

VENDOR:

LOAD

    right('00000'&KVKNO&'0000',12) as KVKNO,

FROM [lib://Data/VENDOR - Copy.csv]

(txt, codepage is 28591, embedded labels, delimiter is '~', msq)

where left(VENNO,2) <> '--' and KVKNO <> '';



KVKCOUNTER:

LOAD DISTINCT KVKNO as KVKNUM,

RowNo() as RowNo

RESIDENT VENDOR;


let kvkCounterRows = NoOfRows('KVKCOUNTER');


for i=0 to 10

//for i=0 to $(kvkCounterRows)


let KVKNO = peek('KVKNUM',$(i),KVKCOUNTER);


KVK:

LOAD

    @1 as 'KVKCOLUMN',

    trim(@2) as 'KVKNO',

FROM $(vUrl)

(html, codepage is 1252, no labels, table is @1)

where @1 = 'KvK';


SBI:

LOAD

    @1 as 'SBICOLUMN',

    TRIM(left(@2,INDEX(@2,' -'))) as 'SBICODE',

    RowNo() as 'Key'

FROM $(vUrl)

(html, codepage is 1252, no labels, table is @2)

where @1 = 'SBI (KvK)';

next i;

Do you recognize inaccuracies or some?

grtrz.

sandeep_roy
Contributor II

Re: How to load data from web file dynamically

Hi Pascal,

Use debugger for single row to check the error.. If you give the QVF file then I can check more correctly.

Also check this part if it fine or not:

KVK:

LOAD

    @1 as 'KVKCOLUMN',

    trim(@2) as 'KVKNO',

FROM $(vUrl)

(html, codepage is 1252, no labels, table is @1)

where @1 = 'KvK';

vijetasharma
Valued Contributor

Re: How to load data from web file dynamically

If i have 10 tables is it necessary to select each table and create different connection strings.Is there any way I can load 10 tables at a time. I have passed those tables into request body but, seems it taking only first one.