Refresh the table fully after setting up incremental refresh with TMSL

I have seen this question a few times. When incremental refresh is setup, we cannot refresh the whole model. Some workarounds are deploying the model again but that is not the best solution. There is a way if your model is running on a XMLA enabled capacity. You can send a TMSL command with our without incremental refresh.

With Incremental refresh it looks like this:

{
  "refresh": {
    "type": "full",
    "applyRefreshPolicy": true,
    "effectiveDate": "8/14/2016",
    "objects": [
      {
        "database": "IR_Taxi",
        "table": "Trip"
      }
    ]
  }
}

This will allow you to say which table needs to be refreshed and if the refreshpolicy needs to be applied and from which date. When you use the Power BI to refresh it will always use the current date as date parameter. Here you can tune it.

Now if you want to run the refresh without policy you can just omit those lines:

{
  "refresh": {
    "type": "full",
    "objects": [
      {
        "database": "IR_Taxi",
        "table": "Trip"
      }
    ]
  }
}

This will refresh the whole table (or all the partitions in the table).

One Reply to “Refresh the table fully after setting up incremental refresh with TMSL”

  1. Hello Kasper,

    unfortunately I have to disagree with your article. Omitting the RefreshPolicy lines will not result in loading all partitions. In my case only the last 5 years are refreshed. (That is the window I set)

    To reach my goal I had to use the Invoke-ProcessPartition with Powershell.

    Do we have an error here – am I doing something wrong? As said before the XMLA statement looks exactly the same as yours

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.