2 Replies Latest reply: Oct 11, 2017 2:37 PM by Aehman K RSS

    If Data connection exist for DB then...Logic

    Chris Witman

      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,

        • Re: If Data connection exist for DB then...Logic
          Aehman K

          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?

          • Re: If Data connection exist for DB then...Logic
            Aehman K

            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