Skip to content

Commit 230cd27

Browse files
committed
hcpps refresh
1 parent 878f576 commit 230cd27

85 files changed

Lines changed: 692 additions & 708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
26 Bytes
Loading
56 Bytes
Loading
-10.8 KB
Loading

tutorials/hcpps-rest-ps-dataset/hcpps-rest-ps-dataset.md

Lines changed: 43 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: Test the "Dataset" service
3-
description: Using a REST client, you will test the "Dataset" SAP Predictive services
2+
title: Test the Dataset service
3+
description: Using a REST client, you will test the Dataset SAP Predictive service
4+
auto_validation: true
45
primary_tag: products>sap-predictive-service
56
tags: [ tutorial>beginner, topic>machine-learning, products>sap-predictive-service, products>sap-cloud-platform ]
67
---
@@ -14,44 +15,47 @@ tags: [ tutorial>beginner, topic>machine-learning, products>sap-predictive-servi
1415

1516
## Details
1617
### You will learn
17-
- How to "Register" your data set with the SAP Predictive services using a REST Client.
18+
- How to **Register** and **Manage** your data set with the SAP Predictive services using a REST Client.
1819

20+
> ### **Note**: if you are running into some issue, you can check the [SAP Predictive services Troubleshooting guide](https://www.sap.com/developer/tutorials/hcpps-troubleshoot.html) to diagnose the most common ones.
1921
2022
### Time to Complete
2123
**10 minutes**
2224

23-
> In order to ease the readability of this tutorial, we have used tokens to replace long URLs.
24-
> Therefore you can replace any occurrence of the token by the value listed above:
25-
>
26-
> - <code><b>C4PAURL</b></code> : represents the predictive services **Application URL** displayed on the overview page and should look like this (XYZ is your SAP Cloud Platform account name):
27-
>
28-
```
29-
https://aac4paservicesXYZ.hanatrial.ondemand.com/com.sap.aa.c4pa.services
30-
```
31-
>
32-
>
33-
> If you are unclear with what is your SAP Cloud Platform account name, you can refer to the following blog entry: [SAP Cloud Platform login, user name, account id, name or display name: you are lost? Not anymore!](https://blogs.sap.com/2017/01/31/sap-hana-cloud-platform-trial-login-name-user-name-account-name-account-identifier-you-are-lost-not-anymore/)
25+
[ACCORDION-BEGIN [Info: ](Application URL)]
3426

35-
&nbsp;
27+
In order to ease the readability of this tutorial, we have used the **C4PAURL** token to replace the predictive services **Application URL** displayed on the overview page.
28+
29+
Therefore you can replace any occurrence of the token by your value listed.
30+
31+
The **Application URL** should look like this (where XYZ is your SAP Cloud Platform account name):
3632

37-
> **Note**: if you are running into some issue, you can check the [SAP Predictive services Troubleshooting guide](https://www.sap.com/developer/tutorials/hcpps-troubleshoot.html) to diagnose the most common ones.
33+
- `https://aac4paservicesXYZ.hanatrial.ondemand.com/com.sap.aa.c4pa.services`
34+
35+
If you are unclear with what is your SAP Cloud Platform account name, you can refer to the following blog entry: [SAP Cloud Platform login, user name, account id, name or display name: you are lost? Not anymore!](https://blogs.sap.com/2017/01/31/sap-hana-cloud-platform-trial-login-name-user-name-account-name-account-identifier-you-are-lost-not-anymore/)
36+
37+
[DONE]
38+
[ACCORDION-END]
3839

3940
[ACCORDION-BEGIN [Info:](A short description of the Dataset service)]
4041

4142
In order to use any of the SAP Predictive services, you will need a registered dataset.
4243

4344
When registering a dataset, you will define and store the structure of the dataset which will be used by the other services.
4445

45-
We upload 3 datasets in one of the previous steps, but we will be using the `CashFlow` dataset as an example here. You can replicate the steps for the other 2 datasets.
46+
You uploaded 3 datasets in one of the previous steps, but here you will be using the `CashFlow` dataset as an example.
47+
48+
You can replicate the steps for the other 2 datasets.
4649

4750
This service:
4851

4952
- Analyze the database object DDL to return you the name and the data type of each columns
5053
- Analyze a few hundreds rows to determine the value type of the column (continuous, nominal or ordinal)
5154
- Get the number of rows and columns
5255

53-
Once registered, you will be able to use the dataset "ID" to call the other services.
56+
Once registered, you will be able to use the dataset ***ID*** to call the other services.
5457

58+
[DONE]
5559
[ACCORDION-END]
5660

5761
[ACCORDION-BEGIN [Step 1: ](Register a dataset)]
@@ -93,7 +97,7 @@ Pick **`JSON (application/json)`** in the drop down (instead of Text).
9397

9498
![Postman URL](03.png)
9599

96-
Add the following content in the text area as displayed above:
100+
Select the **Body** tab, enable the **raw** mode and select `JSON (application/json)` in the drop down, then add the following content:
97101

98102
```json
99103
{
@@ -108,35 +112,13 @@ Click on **Send**
108112

109113
It will now display the data set registration identifier, the number of rows and the variable descriptions.
110114

111-
Now, we can use the <code><b>ID</b></code> value to reference the registered dataset with other SAP Predictive services calls.
112-
113-
The below extract was shortened to ease the reading.
114-
```
115-
{
116-
"ID": 1,
117-
"name": "CashFlow",
118-
"numberOfColumns": 25,
119-
"numberOfRows": 272,
120-
"variables": [
121-
{
122-
"name": "Date",
123-
"position": 0,
124-
"storage": "date",
125-
"value": "continuous"
126-
},
127-
{
128-
"name": "WorkingDaysIndices",
129-
"position": 1,
130-
"storage": "integer",
131-
"value": "continuous"
132-
},
133-
....
134-
]
135-
}
136-
```
115+
Now, you can use the <code><b>ID</b></code> value to reference the registered dataset with other SAP Predictive services calls.
137116

138117
Click on **Send** an additional 2 or 3 times, so you will have multiple dataset registered to play with.
139118

119+
Provide an answer to the question below then click on **Validate**.
120+
121+
[VALIDATE_1]
140122
[ACCORDION-END]
141123

142124
[ACCORDION-BEGIN [Step 2: ](Retrieve the registration details for one dataset)]
@@ -151,16 +133,15 @@ URL | <code><b>C4PAURL</b></code>`/api/analytics/dataset/`<code><b>ID
151133

152134
> Make sure you replace the <code><b>ID</b></code> token in the URL with the one returned by the dataset <code><b>ID</b></code> return in the previous service call.
153135
154-
&nbsp;
155-
156136
Select the **Authorization** tab and fill in the same details as in the previous call.
157137

158138
Click on **Send**
159139

160140
You should receive the same description as from the previous call.
161141

162-
If you try with an unknown <code><b>ID</b></code>, you should receive an error message.
142+
If you try with an unknown <code><b>ID</b></code>, you should receive a 404 response.
163143

144+
[DONE]
164145
[ACCORDION-END]
165146

166147
[ACCORDION-BEGIN [Step 3: ](Retrieve the registration details for one variable)]
@@ -175,14 +156,15 @@ URL | <code><b>C4PAURL</b></code>`/api/analytics/dataset/`<code><b>ID
175156

176157
> Make sure you replace the <code><b>ID</b></code> token in the URL with the one returned by the dataset <code><b>ID</b></code> return in the first service call.
177158
178-
&nbsp;
179-
180159
Select the **Authorization** tab and fill in the same details as in the previous call.
181160

182-
Click on **Send**
161+
Click on **Send**.
183162

184163
You should receive the description of the first variable from your data set.
185164

165+
Provide an answer to the question below then click on **Validate**.
166+
167+
[VALIDATE_2]
186168
[ACCORDION-END]
187169

188170
[ACCORDION-BEGIN [Step 4: ](Modify registered variable details)]
@@ -199,7 +181,7 @@ By default, the variable storage and value type (nominal, continuous, ordinal)
199181

200182
For example, with variable 4 (`MondayMonthInd`), it is guessed as a continuous integer, but should rather be an ordinal integer.
201183

202-
Let's see how we can fix that.
184+
Let's see how you can fix that.
203185

204186
Open a new tab in ***Postman***.
205187

@@ -216,7 +198,7 @@ URL | <code><b>C4PAURL</b></code>`/api/analytics/dataset/`<code><b>ID
216198

217199
Select the **Authorization** tab and fill in the same details as in the previous call.
218200

219-
Select the **Body** tab, enable the **raw** mode and select `JSON (application/json)` in the drop down, then add the following entries
201+
Select the **Body** tab, enable the **raw** mode and select `JSON (application/json)` in the drop down, then add the following entries:
220202

221203
```json
222204
[
@@ -227,13 +209,14 @@ Select the **Body** tab, enable the **raw** mode and select `JSON (application/j
227209
]
228210
```
229211

212+
[DONE]
230213
[ACCORDION-END]
231214

232215
[ACCORDION-BEGIN [Step 5: ](Delete a dataset registration details)]
233216

234217
Open a new tab in ***Postman***.
235218

236-
Fill in the following information
219+
Fill in the following information:
237220

238221
Field Name | Value
239222
:------------- | :-------------
@@ -246,19 +229,20 @@ URL | <code><b>C4PAURL</b></code>`/api/analytics/dataset/`<code><b>ID
246229

247230
Select the **Authorization** tab and fill in the same details as in the previous call.
248231

249-
Click on **Send**
232+
Click on **Send**.
250233

251-
You have now deleted the second data set we have registered.
234+
You have now deleted the second data set you have registered.
252235

253236
You can try to retrieve the registration details as in step 2 for dataset 2, and you should receive an error message.
254237

238+
[DONE]
255239
[ACCORDION-END]
256240

257241
[ACCORDION-BEGIN [Step 6: ](List all registered datasets)]
258242

259243
Open a new tab in ***Postman***.
260244

261-
Fill in the following information
245+
Fill in the following information:
262246

263247
Field Name | Value
264248
:------------- | :-------------
@@ -267,10 +251,11 @@ URL | <code><b>C4PAURL</b></code>`/api/analytics/dataset/`
267251

268252
Select the **Authorization** tab and fill in the same details as in the previous call.
269253

270-
Click on **Send**
254+
Click on **Send**.
271255

272256
You have now listed all the data set registered in your environment.
273257

258+
[DONE]
274259
[ACCORDION-END]
275260

276261
### Optional
26 Bytes
Loading
0 Bytes
Loading

0 commit comments

Comments
 (0)