4 Replies Latest reply: Dec 14, 2015 6:13 AM by Friedrich Hofmann RSS

    Trying to automate a tedious everyday task - very different numbers?!

    Friedrich Hofmann

      Hi,

       

      I am currently trying to automate, using QlikView, a task that some colleagues in another dpt. do every day in the morning around 5am: They open a specific table in our Database, look at specific BINs (physical locations) and manually count how many items have been there for at least 24hrs. Easy, no?

      => I created a QlikView_app that just does this: I have a filter in the script for only those locations that I'm interested in and for only the items that have been there before "yesterday at 5am" (I compare the timestamp in the database to one I have made myself) - that would be the items that have been on that location for at least 24hrs, just what I want.

      I have made sure that the qvd that this app draws is from 4am (work here starts at 05:30am), so I have the same numbers that they have in the morning - or, well, I think so, but it's definitely not right, else I should have the same numbers as they do ...

       

      Does anyone have an idea?

      I can attach my code, no problem - only, creating a small fake.xls and adapting the code to draw from there is a bit outside my time-wise possibilities - plus, as I don't know what the issue is, I would probably fail in recreating it and you wouldn't see what I mean.

       

      Thanks a lot for trying anyway!

       

      Best regards,

       

      DataNibbler

        • Re: Trying to automate a tedious everyday task - very different numbers?!
          kushal chawda

          If they are checking the data for last 24 hours, they might have written some queries to do that so why you are not asking them to provide query which you can run directly from QlikView to get the data

            • Re: Trying to automate a tedious everyday task - very different numbers?!
              Friedrich Hofmann

              Hi Kush,

               

              well, they have not written a query - up to now, they do really open the view of the database_table, enter one of the BINs, query that - that is an internal query that just retrieves all the records, nothing they have made - and then they really count the records finger-on-screen, so to speak ;-)

              => So there is nothing I could just copy. But still - I have just been with them and they have "manually" counted the records in the table I am querying once more - and got the same result that they had this morning - well, slightly different as people have worked to empty those locations since.  But using my QlikView_app, which draws on data that has been queried from the database today at 4am, I get much higher numbers ...

                • Re: Trying to automate a tedious everyday task - very different numbers?!
                  Friedrich Hofmann

                  Okay,

                   

                  I have tried something different. They actually work on a different table which is a summary, but the contents should be the exact same, a colleague said - well, maybe the granularity is different. I tried the other one now. Couldn't load that before, I must have made some stupid mistake, now it worked - and it seems that the COUNTs from that table are very much different from the COUNTs in the detail_table I used to work on until now, so those might be the correct figures.

                  I cannot really compare that with their figures until tomorrow morning, however, as the data in the Database does of course change all the time.

                  I have thus implemented a little addition in our main data_loading_script to fetch that table at 4am, before SOB tomorrow.

                  I will be back here after that.

                   

                  Best regards,

                   

                  DataNibbler