You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The Tenant ID of Azure Active Directory. See https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant
43
+
/// </summary>
33
44
publicstringTenantId{get;set;}
45
+
46
+
/// <summary>
47
+
/// This is the service principal for the Power BI REST API authentication.
48
+
/// Usually, the tool runs in a scheduled unattended batch.
49
+
/// The service principal is a string with a global unique identifier.
50
+
/// For more details about the service principal, read https://www.sqlbi.com/articles/creating-a-service-principal-account-for-power-bi-api/
51
+
/// </summary>
34
52
publicstringPrincipalId{get;set;}
53
+
54
+
/// <summary>
55
+
/// The client secret for the service principal.
56
+
/// For more details about the client secret, read https://www.sqlbi.com/articles/creating-a-service-principal-account-for-power-bi-api/
57
+
/// </summary>
35
58
publicstringClientSecret{get;set;}
36
59
37
60
// Properties for user authentication (required for Refresh in PbiPushDataset)
61
+
62
+
/// <summary>
63
+
/// The Client ID of the application registered in Azure Active Directory
64
+
/// that calls the REST API to update the push dataset.
65
+
/// You can see how to register an application and obtain a Client ID in https://www.sqlbi.com/articles/creating-a-service-principal-account-for-power-bi-api/
66
+
/// </summary>
38
67
publicstringClientId{get;set;}
68
+
69
+
/// <summary>
70
+
/// The username to retrieve data from the regular dataset to initialize the push dataset after the daily refresh.
71
+
/// </summary>
39
72
publicstringUsername{get;set;}
73
+
74
+
/// <summary>
75
+
/// The password to retrieve data from the regular dataset to initialize the push dataset after the daily refresh.
76
+
/// </summary>
40
77
publicstringPassword{get;set;}
41
78
42
79
publicPbiConnection()
43
80
{
44
81
}
45
82
46
83
privatePowerBIClient_powerBIClient;
84
+
85
+
/// <summary>
86
+
/// Returns true if the connection to Power BI is active and already authenticated.
87
+
/// </summary>
47
88
publicboolIsOpen{get=>_powerBIClient!=null;}
48
89
90
+
/// <summary>
91
+
/// Returns the access token for the service principal
92
+
/// </summary>
93
+
/// <returns></returns>
49
94
publicasyncTask<string>GetServicePrincipalToken()
50
95
{
51
96
IConfidentialClientApplicationappBuilder=null;
@@ -72,20 +117,25 @@ public async Task<string> GetServicePrincipalToken()
72
117
// The application doesn't have sufficient permissions.
73
118
// - Did you declare enough app permissions during app creation?
74
119
// - Did the tenant admin grant permissions to the application?
/// Writes in tables of a push dataset the result obtained by running one or more DAX queries
442
+
/// on another dataset published on the same Power BI tenant (also on a different workspace).
443
+
/// </summary>
444
+
/// <param name="groupId">The Group ID corresponding to the Power BI workspace containing the push dataset.</param>
445
+
/// <param name="datasetName">The name of the push dataset to update.</param>
446
+
/// <param name="sourceWorkspace">The name of the workspace containing the dataset to use as a "data source".</param>
447
+
/// <param name="sourceDatabase">The name of the dataset to use as a "data source".</param>
448
+
/// <param name="dax">DAX queries to run over the source dataset.</param>
449
+
/// <param name="refreshingTable">Action to execute while updating the tables in the push dataset.</param>
450
+
/// <param name="clearTable">TRUE to overwrite destination tables in the push dataset, FALSE to append rows to existing data in the push dataset.</param>
451
+
/// <returns>List of tables and number of rows written for each table.</returns>
/// Writes in tables of a push dataset the result obtained by running one or more DAX queries
472
+
/// on another dataset published on the same Power BI tenant (also on a different workspace).
473
+
/// </summary>
474
+
/// <param name="groupId">The Group ID corresponding to the Power BI workspace containing the push dataset.</param>
475
+
/// <param name="datasetId">The Dataset ID of the push dataset to update.</param>
476
+
/// <param name="sourceWorkspace">The name of the workspace containing the dataset to use as a "data source".</param>
477
+
/// <param name="sourceDatabase">The name of the dataset to use as a "data source".</param>
478
+
/// <param name="dax">DAX queries to run over the source dataset.</param>
479
+
/// <param name="refreshingTable">Action to execute while updating the tables in the push dataset.</param>
480
+
/// <param name="clearTable">TRUE to overwrite destination tables in the push dataset, FALSE to append rows to existing data in the push dataset.</param>
481
+
/// <returns>List of tables and number of rows written for each table.</returns>
/// Writes in tables of a push dataset the result obtained by running one or more queries
495
+
/// on an ADOMD connection. For example, it can be used to run queries over Analysis Services instances.
496
+
/// </summary>
497
+
/// <param name="groupId">The Group ID corresponding to the Power BI workspace containing the push dataset.</param>
498
+
/// <param name="datasetId">The Dataset ID of the push dataset to update.</param>
499
+
/// <param name="connectionString">ADOMD connection string for the source database.</param>
500
+
/// <param name="query">Queries to run over the source database.</param>
501
+
/// <param name="refreshingTable">Action to execute while updating the tables in the push dataset.</param>
502
+
/// <param name="clearTable">TRUE to overwrite destination tables in the push dataset, FALSE to append rows to existing data in the push dataset.</param>
503
+
/// <returns>List of tables and number of rows written for each table.</returns>
0 commit comments