Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
cwitman1
Contributor III
Contributor III

If Data connection exist for DB then...Logic

Is there a way to write a load script that checks if a DB connection is there, and if it is then load that data. If not move on?

Thanks,

1 Solution

Accepted Solutions
MK9885
Master II
Master II

Must Include statement?

LET vInclude_Filename = '.\Includes\DBConnection.txt';

LET vInclude_Directory = '.\Includes\Variables.txt';

TRACE <LOG> Attempting to INCLUDE file [$(vInclude_Filename)];

IF IsNull (FileTime( vInclude_Filename )) THEN;

TRACE File doesnt exist [ $(vInclude_Filename) ];

EXIT SCRIPT ;

END IF;


$(must_include=$(vInclude_Filename));

TRACE ('[$(vInclude_Filename) ] file was found and incorporated into script');

$(must_include=$(vInclude_Directory));

This would throw error if it doesn't find a DB file.

Or are you looking for a real time B string access?

View solution in original post

2 Replies
MK9885
Master II
Master II

Must Include statement?

LET vInclude_Filename = '.\Includes\DBConnection.txt';

LET vInclude_Directory = '.\Includes\Variables.txt';

TRACE <LOG> Attempting to INCLUDE file [$(vInclude_Filename)];

IF IsNull (FileTime( vInclude_Filename )) THEN;

TRACE File doesnt exist [ $(vInclude_Filename) ];

EXIT SCRIPT ;

END IF;


$(must_include=$(vInclude_Filename));

TRACE ('[$(vInclude_Filename) ] file was found and incorporated into script');

$(must_include=$(vInclude_Directory));

This would throw error if it doesn't find a DB file.

Or are you looking for a real time B string access?

MK9885
Master II
Master II

It is better to have a Load status view in your DB.

Where Load Status = C would start the qlik load

Where Load Status = F would do nothing.

And this qvw can be 1st task than ny other qvw's