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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Trigger help

Hi Everyone,

I have the below requirement and done the below way.

I need to run my Application based on the database value.So I have created one Dummy Extractor/Generator and scheduled through QMC every 15 mins and the script as below.

CHECK:

LOAD Status,

    Import_Date

FROM

                      //Idleally its DB table name

(ooxml, embedded labels, table is Sheet1);

IF Peek('Status') ='Y' THEN

STORE CHECK INTO E:\qvsdocs\qvd\Flag_Test.QVD;

END IF;

In my applition i have mentioned the below condition;

          if(QvdCreateTime('E:\qvsdocs\qvd\EDW_Flag_Test.QVD')>= today()) then

                    My entire script.

          endif;

Problem : Once my qvd E:\qvsdocs\qvd\Flag_Test.QVD is generated and application is running thats fine.But my "Dummy Extractor is running every 15 mins.So my application is also started running because it scheduled based on the Dummy extractor.

I want to stop running of My dummy Extractor Once the E:\qvsdocs\qvd\Flag_Test.QVD is generated.

More thanks,

Ajay

1 Solution

Accepted Solutions
ajaykumar1
Creator III
Creator III
Author

Once Thanks again Ruben.It looks it should work perfectly.

I will close thread asap when am applying the logic.

Thanks,

Ajay

View solution in original post

9 Replies
ajaykumar1
Creator III
Creator III
Author

Hi,

Anyhelp from anyone or is there any alternate solution to achieve the above task?

More Thanks,

Ajay

rubenmarin

Hi ajay, one idea that maybe works:

Modify dummy extractor starting to check if a previous flaq_test is created:

if(QvdCreateTime('E:\qvsdocs\qvd\EDW_Flag_Test.QVD')>= today()) then

  LOAD * Resident ProvokeError: // This row will return an error if EDW_Flag_Test.QVD was created today()

else

  your script...

...

Then you can configure the reload of the application when Dummy Extractor reload task is ended with sucess.

ajaykumar1
Creator III
Creator III
Author

Thanks Ruben,

But you mentioned script above script i used in the application.

I didnt get what i need to change at dummy extractor level.

THanks,

Ajay

rubenmarin

App will reload only one time, when extractor ends as success and the qvd was created today.

1.Until qvd is generated extractor will end as success, thee app tries to reload but checking the date of the EDW_Flag_Test.QVD file goes to the else and doesn't reloads anything

2.First time the Status='Y' the extractor will create the file, ends as success and the app reload is executed and fully reloaded

3.Next execution after the first full reload: The extractor check if he created the qvd this day, the file is created so it finish with an error. As it's not a success the reload of the application won't be executed.

ajaykumar1
Creator III
Creator III
Author

Thanks ruben,

I am still getting problem at 1st step only.2 and 3 i understood.

1.Until qvd is generated extractor will end as success, thee app tries to reload but checking the date of the EDW_Flag_Test.QVD file goes to the else and doesn't reloads anything------------------Not understood.


Could you please add script if possible.



More Thanks,

Ajay





Qrishna
Master
Master

Check the 'Edit Task' Properties and reconfigure them.

I guess you made a depedency for the Application on the QVD generator run status.

rubenmarin

That step is the way it's working now, isn't it?:

The extractor reloads each 15 minutes, when it ends the app tries to reload, does the "if(QvdCreateTime('E:\qvsdocs\qvd\EDW_Flag_Test.QVD')>= today()) then", as it's still not created today goes to the else of this 'if', so avoids all the script.

the script for extractor:

if(QvdCreateTime('E:\qvsdocs\qvd\EDW_Flag_Test.QVD')>= today()) then

  LOAD * Resident ProvokeError: // This row will return an error if EDW_Flag_Test.QVD was created today()

else

     CHECK:

     LOAD Status,

         Import_Date

     FROM

                           //Idleally its DB table name

     (ooxml, embedded labels, table is Sheet1);

     

     IF Peek('Status') ='Y' THEN

     STORE CHECK INTO E:\qvsdocs\qvd\Flag_Test.QVD;

     END IF;

End if

ajaykumar1
Creator III
Creator III
Author

Once Thanks again Ruben.It looks it should work perfectly.

I will close thread asap when am applying the logic.

Thanks,

Ajay

ajaykumar1
Creator III
Creator III
Author

Thanks its working.

Ajay