Forum Discussion

AnkitKukreja's avatar
AnkitKukreja
Icon for Super User rankSuper User
3 years ago
Solved

Unable to do Query Folding with Incremental refresh

Hi All,

 

I'm setting up an incremental refresh for the SAP data source and I am unable to fold the query. I have tried 2 approaches. 

1st I used the sample code from the official doc and tried to apply the filter within the m code with the column being the text data type and 2nd I changed the column data type to date/time and then applied parameters in the power query (attached doc with m-code).

 

We are trying to include the data for the last 3 years as per client needs, if there is any other approach I can use then I'm open to ideas as well. My client has a Pro workspace so I'm restricted to that.

 

Appreciate the response.

 

 

3 Replies

  • Query Folding is desired for Incremental Refresh, but not required.  What is required is that your Power Query includes filters for RangeStart and RangeEnd that are meaningful for the formation of the partitions in your dataset.

     

    So for example if you have yearly files from your SAP data source then you need to convert that year information in your meta data (for example as part of the file name) to a DateTime value (first day of the year, for example)  for RangeStart  and then add one year for RangeEnd.

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

         

        if query folding is not happening then incremental refresh won't have any use

         

        Please provide more details. I don't see anything in that article corroborating this statement. I have a 25GB (and growing) dataset that seems to say otherwise.