Define Time Frame of Datareader Load

Hi,

 

I would like to improve some of our datareaders, which take a long time to load.

These display different KPIs per Month for the last 24 month's.

Is it possible to define in Board that the datareader should only update the 2 most recent months with the data from the server, instead of updating the full history which is in the server?

 

Thanks

 

Mathias

Answers

  • Björn Reuber
    Björn Reuber Employee, Community Captain
    500 Likes Fourth Anniversary 100 Comments 5 Answers

    Hi,

     

    I know that in some Projects we're doing similar stuff with certain views. So we're not loading directly from the tables, but from views, whcih have Where Statement directly on the date (using Transact SQL).

     

    So I wouldnt solve the problem directly in the DR, for me its more related to DWH/data delivery

     

    regards

    Björn

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    500 Comments 250 Likes Fourth Anniversary 25 Answers

    Hi Mathias Flintrop,

     

    I would also recommend the solution Björn Reuber suggested. Although it is possible to implement this in a DataReader--due to the fact that the DataReader currently cannot work with variables, you'd have to build a WHERE clause with GetDate() - x days to achieve your aim (the same you'd be doing for the view in the SQL database).

    But--in terms of maintenance, it's always better doing this via views.

     

    Kind Regards,

    Helmut

  • build a WHERE clause with GetDate() - x days to achieve your aim

    I see one issue there if there are many datareaders to change once, and that later the time period is not "the two last months" anymore but "the last 6 months" or the "whole previous year"

     

    Other option:

    1. in BOARD create a RDB cube (type integer) having only the entity month in its structure and map it to a table of the underlying SQL database, e.g. T_MONTH_TO_LOAD having two columns: MONTH and FLAG_LOAD
    2. in a screen for administrators of the BOARD solution, create a data-entry dataview on this cube. This way, the administrator can tick the months he wants to load from the underlying database
    3. in all relevant BOARD datareaders, modify the SQL query in manual mode by adding an INNER JOIN condition, e.g.
      INNER JOIN T_MONTH_TO_LOAD ml ON ml.MONTH = month column of the query
      WHERE ml.FLAG_LOAD = 1

    this way the administrator can decide which time period he uniformly loads for all its datareaders.

  • Solved.

     

    We found a workaround. Problem was that the View in our SQL Server was grabbing data from multiple tables which resulted in a long loading time already in the server.

    To fix that we created a table from this view and use this connection for the datareaders. The loading time decreased from 30 Minutes to less then 1 Minute.

     

    Thanks for the help.

     

    Best

     

    Mathias