Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
DipeshVadgama
Partner - Creator II
Partner - Creator II

Loading data from 2 different sources

Hi,

Can we load data from 2 different sources ? I mean if 1st file is not available in sources path then load same data file from other path.

Example.

Load

*

From C:\xzy.csv  OR  D:\xzy.csv;

If we can then please give me some example.

3 Replies
sunny_talwar

May be use an if statement like this

If FileSize(C:\xzy.csv) > 0 THEN

    

     Load

     *

     From C:\xzy.csv

ELSE

     Load

     *

     From D:\xzy.csv

ENDIF

olivierrobin
Specialist III
Specialist III

hello

you can use the filesize / filename / fielpath functions to determine if a file exist or not and then load a 2nd one

example:

let file='filea'

if filesize(a)=0 then

let file='fileb'

end if

file_loaded:

load * from $(file)

Chanty4u
MVP
MVP

you need to create to connections then.

both should be on same server.