LAE

 View Only
  • 1.  How to automatically choose between a BRD file read and a DB query?

    Employee
    Posted 09-11-2019 04:44

    Dear all,

    I've got a question for LAE 6.1.4: how to automatically choose between a BRD file and a DB query?

    Succeeded so far:

    • I can work with nodes DB Query, Output BRD File and read BRD file, no problems.
    • I am able to write the query date to the file name and I can compare it to the run date, and choose the latest available file: dateSubstract(RunDate,FileDate) <= 7.

    Problem background:

    • I have a massive DB query that produces nearly 20 million row items. This is written into a BRD file.
    • The BRD file should be used as a data source (instead of the costly DB query) when the file is less than 7 days old.

    THE question:

    • How can I automate the graph to choose the right action: if BRD file is 7 days or older, then perform the DB query and output a new file?
    • Please see the clumsy flowchart (attached) depicting the situation.

    Thank you in advance for helping the clumsy LAE newbie!

    Attached files

    BRD file and DB query question flowchart.PNG

     



  • 2.  RE: How to automatically choose between a BRD file read and a DB query?

    Employee
    Posted 09-11-2019 06:15

    ADDITION: I do realise I could schedule the weekly DB query and use only the BRD file in the graph. But I am wondering, if it's possible to build the described function in LAE.

    PS: Editing the original message didn't work out for some reason, thus this addition in the comment section.



  • 3.  RE: How to automatically choose between a BRD file read and a DB query?

    Employee
    Posted 09-12-2019 10:06

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    This might not be the most elegant solution. But I'm going to suggest reading in the BRD all the time, then dropping it if it's over 7 days and proceeding with the query. On the flip side of that if you use the BRD, execute some dummy query and join all the data together and proceed with the rest of your graph. Have a look at the brg attached for what I'm saying.

     

    Attached files

    ChooseBRDorQuery.brg