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: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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.


Anonymous
Not applicable
Author

This is Settings.ini

[Settings 7]

StandardReload=0

InterfaceLanguage=English

NumberOfDocuments=0

DocumentTimeout=60

Anonymous
Not applicable
Author

Alright Pascal. This seems fine.

But what actual error you are getting after load data?

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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';

vijetas42
Specialist
Specialist

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.