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
- 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.
18
19
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.
19
21
20
22
### Time to Complete
21
23
**10 minutes**
22
24
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):
> 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)]
34
26
35
-
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):
36
32
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.
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]
38
39
39
40
[ACCORDION-BEGIN [Info:](A short description of the Dataset service)]
40
41
41
42
In order to use any of the SAP Predictive services, you will need a registered dataset.
42
43
43
44
When registering a dataset, you will define and store the structure of the dataset which will be used by the other services.
44
45
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.
46
49
47
50
This service:
48
51
49
52
- Analyze the database object DDL to return you the name and the data type of each columns
50
53
- Analyze a few hundreds rows to determine the value type of the column (continuous, nominal or ordinal)
51
54
- Get the number of rows and columns
52
55
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.
54
57
58
+
[DONE]
55
59
[ACCORDION-END]
56
60
57
61
[ACCORDION-BEGIN [Step 1: ](Register a dataset)]
@@ -93,7 +97,7 @@ Pick **`JSON (application/json)`** in the drop down (instead of Text).
93
97
94
98

95
99
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:
97
101
98
102
```json
99
103
{
@@ -108,35 +112,13 @@ Click on **Send**
108
112
109
113
It will now display the data set registration identifier, the number of rows and the variable descriptions.
110
114
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.
137
116
138
117
Click on **Send** an additional 2 or 3 times, so you will have multiple dataset registered to play with.
139
118
119
+
Provide an answer to the question below then click on **Validate**.
120
+
121
+
[VALIDATE_1]
140
122
[ACCORDION-END]
141
123
142
124
[ACCORDION-BEGIN [Step 2: ](Retrieve the registration details for one dataset)]
> 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.
153
135
154
-
155
-
156
136
Select the **Authorization** tab and fill in the same details as in the previous call.
157
137
158
138
Click on **Send**
159
139
160
140
You should receive the same description as from the previous call.
161
141
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.
163
143
144
+
[DONE]
164
145
[ACCORDION-END]
165
146
166
147
[ACCORDION-BEGIN [Step 3: ](Retrieve the registration details for one variable)]
> 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.
177
158
178
-
179
-
180
159
Select the **Authorization** tab and fill in the same details as in the previous call.
181
160
182
-
Click on **Send**
161
+
Click on **Send**.
183
162
184
163
You should receive the description of the first variable from your data set.
185
164
165
+
Provide an answer to the question below then click on **Validate**.
0 commit comments