Forum Discussion

fanatic's avatar
fanatic
Frequent Visitor
2 years ago
Solved

Suggestions on Configuring Incremental Refresh

I have a shift table where shift details are stored. It contains shift details where shift date is from 2019 to 2 years in future with respect to todays date, It contains more than 5 million records. I have a few other tables with similar amount of data ranging from 4 million -15 million records. We need an hourly refresh of the dataset and it's consuming lot of resources(CU's) when loading all the records each refresh. I want to understand the best possible way to reduce the load. I've tried incremental refresh, but my table is not immutable so it's creating duplicate records. 
Here is a sample of the table:

ShiftIDShiftNameShift DateInserted DateUpdated Date
a1ACT-JAN-PPa11/01/20231/01/20201/02/2024
a2CCP-MAY-UKr41/05/202315/05/20228/03/2023
a3TDP-JUN-YCp32/06/20231/12/202218/03/2024
a4PSK-DEC-JSp131/12/20233/01/202316/01/2024
b1CBN-JAN-BRs11/01/20241/01/202217/02/2023
b2POK-MAY-INa121/05/202415/10/202312/08/2024
b3MOD-JUN-SHa323/06/202417/06/202415/01/2024
b4CBN-AUG-BRs219/08/20241/01/20211/07/2024
c1POK-SEP-INa215/09/202415/01/20231/01/2024
c2MOD-OCT-SHa417/10/202414/01/202414/01/2024
c3CBN-DEC-TDp431/12/202425/08/20242/03/2024
c4ISR-JAN-PSn1312/01/202527/07/202327/07/2023
c5MOD-FEB-SHa513/02/20251/12/20231/12/2023

 

Can you please help me with the best way to reduce the load on the server and load only the rows that have been updated ?
The source data is coming from SQL database and I have written native queries to do all the transformations in the query itself. Is there a better way to solve this issue ?

3 Replies

  • Hello fanatic ,

     

    does the requirments require detailed data from 2019 till now ? 

    you can reduce the data with filtering the date for the needed data only.

     

    you can also group by data if you don't need it detailed.

     

    I don't think you would need these detailed data from 2019 till now, no one would check a specific person in feb 4 2019 what was his shift, they may need total only so you can group by.

    • fanatic's avatar
      fanatic
      Frequent Visitor

      Hi Idrissshatila ,

      Thank you for the reply.

      The business needs 18 months historical data and 12 months future data. We need every record during this time as business uses it for Audit purpose as well. After applying the above month filters we have around 6 million records (20,000 employees, 3-6 shifts a day including deleted records - needed for audit). They need hourly refresh of this data, the refresh takes around 10 minutes but uses a lot of CUs since we are in autoscaling mode and it's costing business extra than the pro/premium capacity we currently have. So wanted to understand is there a way to reduce the CUs consumption