Skip to content

Commit 5a5a367

Browse files
Merge pull request #278655 from minghan/patch-3
Update analysis-services-async-refresh.md to reflect exact audience requirement
2 parents 5b9ffc6 + b307e81 commit 5a5a367

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/analysis-services/analysis-services-async-refresh.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ ms.custom: references_regions
1212
---
1313
# Asynchronous refresh with the REST API
1414

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.
1616

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.
1818

1919
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.
2020

@@ -57,15 +57,15 @@ https://westus.asazure.windows.net/servers/myserver/models/AdventureWorks/refres
5757
All calls must be authenticated with a valid Microsoft Entra ID (OAuth 2) token in the Authorization header and must meet the following requirements:
5858

5959
- 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.
6161
- 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.
6262

6363
> [!IMPORTANT]
6464
> Currently, **server admin** role permissions are necessary.
6565
6666
## POST /refreshes
6767

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.
6969

7070
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.
7171

@@ -91,17 +91,17 @@ The body may resemble the following:
9191

9292
### Parameters
9393

94-
Specifying parameters is not required. The default is applied.
94+
The default value is applied if the parameter isn't specified.
9595

9696
| Name | Type | Description |Default |
9797
|------------------|-------|--------------|---------|
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 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` |
100100
| `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 |
102102
| `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 |
103103

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).
105105

106106
> [!NOTE]
107107
> At time of writing, the batch size is the MaxParallelism value, but this value could change.
@@ -211,7 +211,7 @@ The code sample uses [service principal](#service-principal) authentication.
211211

212212
### Service principal
213213

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 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:
215215

216216
1. In the code sample, find **string authority = …**, replace **common** with your organization's tenant ID.
217217
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

Comments
 (0)