Table.ApplyRefreshPolicy 方法

定義

多載

ApplyRefreshPolicy(Boolean, Int32)

調整資料表的資料分割配置,取決於使用的有效日期是以目前時間為基礎的重新整理原則所決定。

ApplyRefreshPolicy(DateTime, Boolean, Int32)

調整資料表的資料分割配置,取決於與資料表相關聯的重新整理原則和指定的有效日期。

ApplyRefreshPolicy(Boolean, Int32)

調整資料表的資料分割配置,取決於使用的有效日期是以目前時間為基礎的重新整理原則所決定。

public System.Collections.Generic.IReadOnlyList<Microsoft.AnalysisServices.Tabular.ModelOperationResult> ApplyRefreshPolicy (bool refresh = true, int maxParallelism = 0);
member this.ApplyRefreshPolicy : bool * int -> System.Collections.Generic.IReadOnlyList<Microsoft.AnalysisServices.Tabular.ModelOperationResult>
Public Function ApplyRefreshPolicy (Optional refresh As Boolean = true, Optional maxParallelism As Integer = 0) As IReadOnlyList(Of ModelOperationResult)

參數

refresh
Boolean

指出是否應該重新整理資料表的資料分割;預設行為是執行重新整理。

maxParallelism
Int32

重新整理執行期間平行處理原則的程度。

傳回

在程式中執行的作業結果。

備註

  • ApplyRefreshPolicy 的執行流程與 RequestRefresh 呼叫所觸發的流程相同,後面接著呼叫 Model.SaveChanges。
  • 執行流程包括:
    • 根據有效日期計算預期的分割配置。
    • 比較預期的分割區配置與現有的分割區集,併發出所需的變更,以移至預期的配置 [視需要卸載、建立和合併分割區]。
    • 重新整理新建立的資料分割,以及累加視窗中的現有分割區。
  • ApplyRefreshPolicy 與 RequestRefresh + SaveChanges 的組合之間唯一的差異是 ApplyRefreshPolicy 會啟用無法使用的進階選項。
  • 當您想要使用單一 API 呼叫時,建議使用 ApplyRefreshPolicy,特別是使用進階選項。
  • 當您想要在呼叫 SaveChanges 之前,先將作業與模型中的其他撰寫呼叫結合時,建議使用 RequestRefresh + SaveChanges 的組合。

適用於

ApplyRefreshPolicy(DateTime, Boolean, Int32)

調整資料表的資料分割配置,取決於與資料表相關聯的重新整理原則和指定的有效日期。

public System.Collections.Generic.IReadOnlyList<Microsoft.AnalysisServices.Tabular.ModelOperationResult> ApplyRefreshPolicy (DateTime effectiveDate, bool refresh = true, int maxParallelism = 0);
member this.ApplyRefreshPolicy : DateTime * bool * int -> System.Collections.Generic.IReadOnlyList<Microsoft.AnalysisServices.Tabular.ModelOperationResult>
Public Function ApplyRefreshPolicy (effectiveDate As DateTime, Optional refresh As Boolean = true, Optional maxParallelism As Integer = 0) As IReadOnlyList(Of ModelOperationResult)

參數

effectiveDate
DateTime

計算資料分割配置時所使用的有效日期。

refresh
Boolean

指出是否應該重新整理資料表的資料分割;預設行為是執行重新整理。

maxParallelism
Int32

重新整理執行期間平行處理原則的程度。

傳回

在程式中執行的作業結果。

備註

  • ApplyRefreshPolicy 的執行流程與 RequestRefresh 呼叫所觸發的流程相同,後面接著呼叫 Model.SaveChanges。
  • 執行流程包括:
    • 根據有效日期計算預期的分割配置。
    • 比較預期的分割區配置與現有的分割區集,併發出所需的變更,以移至預期的配置 [視需要卸載、建立和合併分割區]。
    • 重新整理新建立的資料分割,以及累加視窗中的現有分割區。
  • ApplyRefreshPolicy 與 RequestRefresh+SaveChanges 的組合之間唯一的差異是 ApplyRefreshPolicy 會啟用無法使用的進階選項。
  • 當您想要使用單一 API 呼叫時,建議使用 ApplyRefreshPolicy,特別是使用進階選項。
  • 當您想要在呼叫 SaveChanges 之前,先將作業與模型中的其他撰寫呼叫結合時,建議使用 RequestRefresh + SaveChanges 的組合。

適用於