Skip to content

Commit ac979e5

Browse files
committed
review comments
1 parent 9a985f6 commit ac979e5

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

articles/energy-data-services/tutorial-csv-ingestion.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Ensure you have `curl` installed on your system. You will use it to make API cal
4646
## Ingest wellbore data by using `curl`
4747

4848
To ingest a sample wellbore data CSV file into the Azure Data Manager for Energy instance, complete the following steps:
49+
Replace the placeholders (`<DNS>`, `<access_token>`, etc.) with the appropriate values.
4950

5051
### 1. Create a Schema
5152

@@ -82,7 +83,14 @@ curl -X POST "https://<DNS>/api/schema-service/v1/schema" \
8283
}'
8384
```
8485

85-
Replace the placeholders (`<DNS>`, `<access_token>`, etc.) with the appropriate values. Save the `id` from the response for use in subsequent steps.
86+
**Sample Response:**
87+
```json
88+
{
89+
"id": "schema-12345",
90+
"status": "DEVELOPMENT"
91+
}
92+
```
93+
Save the `id` from the response for use in subsequent steps.
8694

8795
### 2. Create a Legal Tag
8896

@@ -109,6 +117,14 @@ curl -X POST "https://<DNS>/api/legal/v1/legaltags" \
109117
}'
110118
```
111119

120+
**Sample Response:**
121+
```json
122+
{
123+
"name": "LegalTagName",
124+
"status": "Created"
125+
}
126+
```
127+
112128
### 3. Get a Signed URL for Uploading a CSV File
113129

114130
Run the following `curl` command to get a signed URL:
@@ -119,6 +135,14 @@ curl -X GET "https://<DNS>/api/file/v2/files/uploadURL" \
119135
-H "data-partition-id: <data-partition-id>"
120136
```
121137

138+
**Sample Response:**
139+
```json
140+
{
141+
"SignedURL": "https://storageaccount.blob.core.windows.net/container/file.csv?sv=...",
142+
"FileSource": "file-source-12345"
143+
}
144+
```
145+
122146
Save the `SignedURL` and `FileSource` from the response for use in the next steps.
123147

124148
### 4. Upload a CSV File
@@ -129,6 +153,13 @@ Download the [Wellbore.csv](https://github.com/microsoft/meds-samples/blob/main/
129153
curl -X PUT -T "Wellbore.csv" "<SignedURL>" -H "x-ms-blob-type: BlockBlob"
130154
```
131155

156+
**Sample Response:**
157+
```json
158+
{
159+
"status": "Success"
160+
}
161+
```
162+
132163
### 5. Upload CSV File Metadata
133164

134165
Run the following `curl` command to upload metadata for the CSV file:
@@ -158,6 +189,15 @@ curl -X POST "https://<DNS>/api/file/v2/files/metadata" \
158189
}
159190
}'
160191
```
192+
193+
**Sample Response:**
194+
```json
195+
{
196+
"id": "metadata-12345",
197+
"status": "Created"
198+
}
199+
```
200+
161201
Save the `id`, which is the uploaded file's id, from the response for use in the next step.
162202

163203

@@ -177,6 +217,15 @@ curl -X POST "https://<DNS>/api/workflow/v1/workflow/csv-parser/workflowRun" \
177217
}
178218
}'
179219
```
220+
221+
**Sample Response:**
222+
```json
223+
{
224+
"runId": "workflow-12345",
225+
"status": "Running"
226+
}
227+
```
228+
180229
Save the `runId` from the response for use in the next step.
181230

182231
### 7. Check the status of the workflow and wait for its completion.
@@ -189,6 +238,15 @@ curl -X GET "https://<DNS>/api/workflow/v1/workflow/csv-parser/workflowRun/<runI
189238
-H "Content-Type: application/json" \
190239
-H "data-partition-id: <data-partition-id>"
191240
```
241+
242+
**Sample Response:**
243+
```json
244+
{
245+
"runId": "workflow-12345",
246+
"status": "Completed"
247+
}
248+
```
249+
192250
Keep checking every few seconds, until the response indicates a sccessful completion.
193251

194252
### 8. Search for Ingested CSV Records
@@ -205,6 +263,19 @@ curl -X POST "https://<DNS>/api/search/v2/query" \
205263
}'
206264
```
207265

266+
**Sample Response:**
267+
```json
268+
{
269+
"results": [
270+
{
271+
"id": "dataset-12345",
272+
"kind": "osdu:wks:dataset--File.Generic:1.0.0",
273+
"status": "Available"
274+
}
275+
]
276+
}
277+
```
278+
208279
You should be able to see the records in the search results.
209280

210281
## Next step

0 commit comments

Comments
 (0)