Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qlikview read from multiple files


Is there any option in qlikview in such a way that, if reading failed from one server, it can read the file from another server(back up)?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That should be possible. See this discussion for example: Dynamic Connection. You can also use the NoOfRows() function to check if the table you tried to load actually contains records. Perhaps something like this:

SET ErrorMode = 0;

CONNECT ...  ;//connect to first database

Table1:

Load * from mysourcetable;

let vNoOfRows = Alt(NoOfRows(‘Table1’), 0);

If vNoOfRows=0 Then

     CONNECT ... ; //connect to second database

     Table1:

     Load * from mysourcetable;

End if


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That should be possible. See this discussion for example: Dynamic Connection. You can also use the NoOfRows() function to check if the table you tried to load actually contains records. Perhaps something like this:

SET ErrorMode = 0;

CONNECT ...  ;//connect to first database

Table1:

Load * from mysourcetable;

let vNoOfRows = Alt(NoOfRows(‘Table1’), 0);

If vNoOfRows=0 Then

     CONNECT ... ; //connect to second database

     Table1:

     Load * from mysourcetable;

End if


talk is cheap, supply exceeds demand
Not applicable
Author

Sory. First pivot table is like this

From: Kausalya Devabhaktuni

Sent: Tuesday, October 08, 2013 3:15 PM

To: 'jive-1890803123-2qwd-2-8m8x@qliktech-public.hosted.jivesoftware.com'

Subject: RE: - qlikview read from multiple files

Hi wassenaar,

I had another doubt. Hoe u might hep me on this

I had three pivot tables like the above. What I want to do is I want to get the common values in three pivot tables.

Some thing like 525-00-10001 and 525-00-100016 are together(lat and long may be different but consider them if they appear as group)

Similarly 525-00-10002 and 525-00-100004 are together. I am sending you my script too

//load from csv file 0-15 mins data with 50 networkid's and 50 users

Report:

LOAD distinct @3 as msisdn,

(@1/86400)+25569 as timestamp,

@2 as networkid

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq);

//grouping to get the first record of user in a networkid

//mapped with lat and long based on networkid

LOAD @1 as networkid,

@2 as lat,

@3 as long

FROM

(txt, codepage is 1252, no labels, delimiter is spaces, msq);

Report1:

LOAD

distinct @3 as msisdn1,

(@1/86400)+25569 as timestamp1,

@2 as networkid1

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq);

//grouping to get the first record of user in a networkid

//mapped with lat and long based on networkid

LOAD @1 as networkid1,

@2 as lat,

@3 as long

FROM

(txt, codepage is 1252, no labels, delimiter is spaces, msq);

Report2:

LOAD

(@1/86400)+25569 as timestamp2,

@2 as networkid2,

@3 as msisdn2

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq);

LOAD @1 as networkid2,

@2 as lat,

@3 as long

FROM

(txt, codepage is 1252, no labels, delimiter is spaces, msq)

;

Actualy my requirement I had list of networkids and list of network users with different time stamps

Get only first record of user. Map with lat and long. Get the users who have movethed toghether 80% of times in a day. There will be total of 24*4 input feeds