cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to register dataset and forecast data based on the generated json or odata model ?

0 Kudos
288

Sir,

First of all I want to thank Mr. Abdel DADOUCHE for his answer on the blog ”Predictive analytics Forecast service”. It will really help me out to generate my analysis.

I have some below mentioned queries on SAP predictive service forecast api.

Queries 1: Is it possible to register dataset and forecast data based on the generated json or odata model which we are used in the SAPUI5 application?

Actually I want to build one application based on the forecast api which will forecast next 3/6/9/12 months required man-hour on different skillset in different project at one shot. Here I am facing an another problem, suppose if in my dataset there are 10 skillsets are present then do we need to create 10 backend table for each skill and register these 10 dataset and then forecast? If answer is “yes” then I think there is no point to create any application for the end user using this predictive service, because in this situation we need to give “create table privilege” for the end user which is bare impossible task for any organization. That’s why I back to my first question again

Is it possible to register dataset and forecast data based on the generated json or odata model which we are used in the SAPUI5 application?

Regards,

Mriganka Basak

Accepted Solutions (1)

Accepted Solutions (1)

abdel_dadouche
Active Contributor
0 Kudos

Hi mriganka.basak2

Thanks for the feedback!

To your question: Is it possible to register dataset and forecast data based on the generated json or odata model which we are used in the SAPUI5 application?

The answer is no, the predictive service cannot consume directly data from a JSON stream or an OData model in SAPUI5.

As the process takes place in SAP HANA, the data must be stored for the service to be executed.

Therefore, you will have to persist or surface the data you want to consume from your JSON stream or your OData model into SAP HANA as a table or a view.

The idea behind the predictive services, is that the service API itself is never touching the data, only the SAP HANA APL does. This also explains why the service API will not inject "data" into SAP HANA, and you can also imagine the impact on performances or security.

To your question: if in my dataset there are 10 skillsets are present then do we need to create 10 backend table for each skill and register these 10 dataset and then forecast?

The answer is no too. In the forecast service you have the ability to skip variables when computing your forecast. You can register your table once, then use it in 10 forecast calls where the list of skipped variables will vary.

For example, when forecasting skill set 1, you would exclude the other including the skippedVariables attribute in your payload:

"skippedVariables" : ["skill02", "skill03",..., "skill10"]

Hope this helps

Regards

@bdel

PS: antoine.chabert thanks for the notification!

0 Kudos

Hi Abdel,

Thanks for your answer.

Now My questions are below mentioned here

Question 1:if end user do not have any authorization to insert record in HANA database then what would be the solution?

Question 2:Suppose we are create an general web application where from multiple end users are upload there records one at a time and each user has an authorization to insert record in HANA database then how we distinguish each user's forecast value?

Thanks in advance

Mriganka

Answers (2)

Answers (2)

0 Kudos

Hi Abdel,

As per your answer on my second question "if in my dataset there are 10 skillsets are present then do we need to create 10 backend table for each skill and register these 10 dataset and then forecast?" --- you told me to implement "skippedVariables" parameter, but as per understanding "skippedVariables" parameter is used to skip other columns which is not related with forecasting not for same column other values. Here I am giving you a scenarios which will drive you for correct understanding.

Suppose in my table there is a column name "Product", in this column we have product values like "P1","P2","P3".now if I want to forecast only on "P1" product then I don't think "skippedVariables" will help us to do this. So my question is "in this scenario what would be the correct way for forecasting?"

Regards,

Mriganka

abdel_dadouche
Active Contributor

Hi,

Thanks for your response.

Based on initial description I assumed that each target value was stored in a separate column and with only one row per date like this:

date  | p0 | p1 | p2 | p...
------|----|----|----|-----
d0    | x0 | x1 | x2 | x... 
d1    | y0 | y1 | y2 | y... 
d...  | z0 | z1 | z2 | z... 

In fact your dataset look like that instead:

date  |  p  |  v 
------|-----|-----
d0    |  p0 |  x0
d0    |  p1 |  x1
d0    |  p2 |  x2
d1    |  p0 |  y0
d1    |  p1 |  y1
d1    |  p2 |  y2
d...  |  p0 |  z...
d...  |  p1 |  z...
d...  |  p2 |  z... 

The "skippedVariables" parameter can only be used to do column filtering not rows filtering.

Technically speaking, the APL (which is used behind the predictive service) uses the SAP Predictive Analytics automated engine (former KXEN libraries) which have a configurable row filtering capabilities (as the library can be used on both flat files and databases).

However this row filtering capability is not exposed in the APL, therefore not available in the predictive services.

Your only option here would be to either:

  • create a set of specific SQL views that will filter the products but any new product will require a new view to be added
  • create a basic SQL view that will transpose/pivot each product into a separate column and use the skippedVariables parameter but any new product will requite the view to be edited

Something I never really tried is:

  • create a SAP HANA view that will filter the rows based on an input parameter

I know that the SAP Predictive Analytics to is able to process SAP HANA views with input parameters, but I'm not sure that SAP HANA AFL therefore APL & the predictive services supports that.

Regards

@bdel

Hi Abdel,

Thanks For your quick response,I'm now creating different views as you mentioned and work on this,but I'm deadly against on this.

I think SAP needs to focus on this kind of scenario.

My Solution:

As per my thoughts SAP needs to create a class on top of the APL library class which will perform the below mentioned task

based on some parameter if SAP create those required views (as you mentioned) internally and provide the result set(collection of table) to end user then it will become more robust service.

Regards,

Mriganka

abdel_dadouche
Active Contributor
0 Kudos

Hi,

I would suggest to engage with thierry.brunet from SAP who is from the Predictive Services development team to share more details on your use case.

Best

Abdel

0 Kudos

Thanks for your suggestion. 🙂

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

thierry.brunet abdel.dadouche thanks for your help. Kind regards Antoine