如何通过Microsoft.C#中的AnalySisservices对特定的SSA分区进行请求refresh

发布于 2025-02-01 19:29:12 字数 482 浏览 2 评论 0原文

我熟悉使用refreshtype.full使用Microsoft.analySisservices.tabular namespace refresh类型的“完整”数据库表刷新

using var server = new Server();
server.Connect("MyConnectionString");
var db = server.Databases.FindByName("MyDatabaseName");
db.Model.Tables["MyTableName"].RequestRefresh(RefreshType.Full);

。 mytableName 数据库表具有三个分区(分区1分区2分区3)。

如果我不想进行完整的数据库表刷新,而是只有该数据库表中的一个分区,那么该语法将如何进行?

I'm familiar with a 'Full' Database Table refresh via the RefreshType.Full refresh type using the Microsoft.AnalysisServices.Tabular namespace:

using var server = new Server();
server.Connect("MyConnectionString");
var db = server.Databases.FindByName("MyDatabaseName");
db.Model.Tables["MyTableName"].RequestRefresh(RefreshType.Full);

Say for example, the MyTableName database table has three partitions (Partition 1, Partition 2, and Partition 3).

If I didn't want to do the full database table refresh, but rather only a single partition within that database table, how would one do this syntactically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墟烟 2025-02-08 19:29:12

首先获取对象

var table = db.Model.Tables["MyTableName"]

表对象的收集分区

var partion = table.Partitions["Partition 2"];

可以使用

partition.RequestRefresh(Microsoft.AnalysisServices.Tabular.RefreshType.Full);

实际过程将发生时, savechanges 在模型上调用方法

var result = db.Model.SaveChanges();

first get the table object

var table = db.Model.Tables["MyTableName"]

the table object has the collection of partitions

var partion = table.Partitions["Partition 2"];

the partition object can be "refreshed" using RequestRefresh method

partition.RequestRefresh(Microsoft.AnalysisServices.Tabular.RefreshType.Full);

The actual process will happen when the SaveChanges method is called on the model

var result = db.Model.SaveChanges();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文