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
Copy file name to clipboardExpand all lines: articles/analysis-services/analysis-services-async-refresh.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ ms.custom: references_regions
12
12
---
13
13
# Asynchronous refresh with the REST API
14
14
15
-
By using any programming language that supports REST calls, you can perform asynchronous data-refresh operations on your Azure Analysis Services tabular models. This includes synchronization of read-only replicas for query scale-out.
15
+
By using any programming language that supports REST calls, you can perform asynchronous data-refresh operations on your Azure Analysis Services tabular models, including synchronization of read-only replicas for query scale-out.
16
16
17
-
Data-refresh operations can take some time depending on a number of factors including data volume, level of optimization using partitions, etc. These operations have traditionally been invoked with existing methods such as using [TOM](/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo) (Tabular Object Model), [PowerShell](/analysis-services/powershell/analysis-services-powershell-reference) cmdlets, or [TMSL](/analysis-services/tmsl/tabular-model-scripting-language-tmsl-reference) (Tabular Model Scripting Language). However, these methods can require often unreliable, long-running HTTP connections.
17
+
Data-refresh operations can take some time depending on many factors including data volume, level of optimization using partitions, etc. Traditionally, these operations have been invoked with existing methods such as using [TOM](/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo) (Tabular Object Model), [PowerShell](/analysis-services/powershell/analysis-services-powershell-reference) cmdlets, or [TMSL](/analysis-services/tmsl/tabular-model-scripting-language-tmsl-reference) (Tabular Model Scripting Language). However, these methods can require often unreliable, long-running HTTP connections.
18
18
19
19
The REST API for Azure Analysis Services enables data-refresh operations to be carried out asynchronously. By using the REST API, long-running HTTP connections from client applications aren't necessary. There are also other built-in features for reliability, such as auto retries and batched commits.
All calls must be authenticated with a valid Microsoft Entra ID (OAuth 2) token in the Authorization header and must meet the following requirements:
58
58
59
59
- The token must be either a user token or an application service principal.
60
-
- The token must have the correct audience set to `https://*.asazure.windows.net`.
60
+
- The token must have the audience set to exactly `https://*.asazure.windows.net`. Note that `*` isn't a placeholder or a wildcard, and the audience must have the `*` character as the subdomain. Specifying an invalid audience results in authentication failure.
61
61
- The user or application must have sufficient permissions on the server or model to make the requested call. The permission level is determined by roles within the model or the admin group on the server.
62
62
63
63
> [!IMPORTANT]
64
64
> Currently, **server admin** role permissions are necessary.
65
65
66
66
## POST /refreshes
67
67
68
-
To perform a refresh operation, use the POST verb on the /refreshes collection to add a new refresh item to the collection. The Location header in the response includes the refresh ID. The client application can disconnect and check the status later if required because it is asynchronous.
68
+
To perform a refresh operation, use the POST verb on the /refreshes collection to add a new refresh item to the collection. The Location header in the response includes the refresh ID. The client application can disconnect and check the status later if necessary because it's asynchronous.
69
69
70
70
Only one refresh operation is accepted at a time for a model. If there's a current running refresh operation and another is submitted, the 409 Conflict HTTP status code is returned.
71
71
@@ -91,17 +91,17 @@ The body may resemble the following:
91
91
92
92
### Parameters
93
93
94
-
Specifying parameters is not required. The default is applied.
94
+
The default value is applied if the parameter isn't specified.
|`Type`| Enum | The type of processing to perform. The types are aligned with the TMSL [refresh command](/analysis-services/tmsl/refresh-command-tmsl) types: full, clearValues, calculate, dataOnly, automatic, and defragment. Add type is not supported. | automatic |
99
-
|`CommitMode`| Enum | Determines if objects will be committed in batches or only when complete. Modes include: default, transactional, partialBatch. | transactional |
98
+
|`Type`| Enum | The type of processing to perform. The types are aligned with the TMSL [refresh command](/analysis-services/tmsl/refresh-command-tmsl) types: `full`, `clearValues`, `calculate`, `dataOnly`, `automatic`, and `defragment`. `add` type isn't supported. |`automatic`|
99
+
|`CommitMode`| Enum | Determines if objects are committed in batches or committed only when the entire operation completes. Modes include: `transactional`, `partialBatch`. |`transactional`|
100
100
|`MaxParallelism`| Int | This value determines the maximum number of threads on which to run processing commands in parallel. This value aligned with the MaxParallelism property that can be set in the TMSL [Sequence command](/analysis-services/tmsl/sequence-command-tmsl) or using other methods. | 10 |
101
-
|`RetryCount`| Int | Indicates the number of times the operation will retry before failing. | 0 |
101
+
|`RetryCount`| Int | Indicates the number of times the operation retries before failing. | 0 |
102
102
|`Objects`| Array | An array of objects to be processed. Each object includes: "table" when processing the entire table or "table" and "partition" when processing a partition. If no objects are specified, the whole model is refreshed. | Process the entire model |
103
103
104
-
CommitMode is equal to partialBatch. It's used when doing an initial load of large datasets that could take hours. If the refresh operation fails after successfully committing one or more batches, the successfully committed batches will remain committed (it will not roll back successfully committed batches).
104
+
Specifying `partialBatch` for `CommitMode` is useful when doing an initial load of large datasets that could take hours. If the refresh operation fails after successfully committing one or more batches, the successfully committed batches will remain committed (it will not roll back successfully committed batches).
105
105
106
106
> [!NOTE]
107
107
> At time of writing, the batch size is the MaxParallelism value, but this value could change.
See [Create service principal - Azure portal](../active-directory/develop/howto-create-service-principal-portal.md) and [Add a service principal to the server administrator role](analysis-services-addservprinc-admins.md) for more info on how to set up a service principal and assign the necessary permissions in Azure AS. Once you've completed the steps, complete the following additional steps:
214
+
See [Create service principal - Azure portal](../active-directory/develop/howto-create-service-principal-portal.md) and [Add a service principal to the server administrator role](analysis-services-addservprinc-admins.md) for more info and follow the steps on how to set up a service principal and assign the necessary permissions in Azure AS. Then complete the following extra steps:
215
215
216
216
1. In the code sample, find **string authority = …**, replace **common** with your organization's tenant ID.
217
217
2. Comment/uncomment so the ClientCredential class is used to instantiate the cred object. Ensure the \<App ID> and \<App Key> values are accessed in a secure way or use certificate-based authentication for service principals.
0 commit comments