Skip to content

Commit efbf430

Browse files
authored
Add examples and explanations for batch analysis
1 parent 7ea65aa commit efbf430

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/ai-services/document-intelligence/prebuilt/batch-analysis.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ The batch API supports two options for specifying the files to be processed.
7373
}
7474

7575
```
76+
7677
* If you don't want to process all the files in a container or folder, but rather specific files in that container or folder, use the ```azureBlobFileListSource``` object. This operation requires a File List JSONL file which lists the files to be processed. Store the JSONL file in the root folder of the container. Here's an example JSONL file with two files listed:
7778

7879
```json
7980
{"file": "Adatum Corporation.pdf"}
8081
{"file": "Best For You Organics Company.pdf"}
8182
```
83+
8284
Use a file list `JSONL` file with the following conditions:
8385

8486
* When you need to process specific files instead of all files in a container;
@@ -98,8 +100,10 @@ Use a file list `JSONL` file with the following conditions:
98100
}
99101
100102
```
103+
101104
A container URL or a container SAS URL is required in both options. Use container URL if using managed Identity to access your storage container. If you're using Shared Access Signature (SAS), use a SAS URL.
102105
106+
103107
### 2. Specify the results location
104108
105109
* Specify the Azure Blob Storage container URL (or container SAS URL) for where you want your results to be stored using `resultContainerURL` parameter. We recommend using separate containers for source and results to prevent accidental overwriting.
@@ -128,8 +132,10 @@ POST /documentModels/{modelId}:analyzeBatch
128132
}
129133
130134
```
135+
131136
This example shows a POST request with `azureBlobFileListSource` and a file list input
132137

138+
133139
```bash
134140
POST /documentModels/{modelId}:analyzeBatch
135141
@@ -182,6 +188,7 @@ For each document processed, a status is assigned, either `succeeded`, `failed`,
182188
183189
Example of a `succeeded` status response:
184190
191+
185192
```bash
186193
{
187194
"resultId": "myresultId-",
@@ -210,6 +217,7 @@ For each document processed, a status is assigned, either `succeeded`, `failed`,
210217
}
211218
}
212219
```
220+
213221
* Status `failed`. This error is only returned if there are errors in the overall batch request. Once the batch analysis operation starts, the individual document operation status doesn't affect the status of the overall batch job, even if all the files have the status `failed`.
214222

215223
Example of a `failed` status response:
@@ -236,6 +244,7 @@ For each document processed, a status is assigned, either `succeeded`, `failed`,
236244
]
237245
...
238246
```
247+
239248
* Status `skipped`: Typically, this status happens when output for the document is already present in the specified output folder and the `overwriteExisting` Boolean property is set to `false`
240249

241250
Example of `skipped` status response:

0 commit comments

Comments
 (0)