Skip to Content
author's profile photo Former Member
Former Member

Very log run time when using AFL-PAL functions to generate statistical forecast for 10,000 individual products

We want to run a statistical sales forecast for 10,000 products using a HANA SQL procedure calling a PAL time series statistical function

We are using the classic BPC models (for various reasons including requiring the standard BPC comments functionality) and callout of to HANA procedures to run the statistical forecast natively in HANA and write to a HANA table. So you can think of it as a HANA SQL procedure using PAL time series functions (double exponential)

We are forecasting 10,000 products with 3 years worth of history (36 monthly data points) and forecasting out 3 years (36 monthly data points). The problem is the BFL/PAL functions only allow us to run the function for one product at a time. HANA is not very efficient at looping though data, we are suppose to avoid loops. If each run of the forecast takes 2 seconds to read, calculate the write the data that is a total 5.55 hours. We have not been able to find a way to force HANA to run the statistical forecasts in parallel. If we could run 120 in parallel it would take 2.77 minutes.

Is there a way to run BFL/PAL statistical functions in parallel for a large data set for multiple ‘products'. Everything we have found is calling it with one ‘ product’ at a time We have looked at S&OP on HANA code but could not work out how it is doing statistical forecasts, we expect this would have been solved with S&OP on HANA.

As a backup we have configured the old BW-IP statistical forecasting functions. This runs for the whole data set at once and takes about 15 mins, a lot faster than the new HANA based PAL functions. This is a potential work around but not ideal.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2015 at 05:51 AM

    Hi Raman

    What we have done in similar scenario is we using the client tool to connect SAP HANA (using JDBC/ODBC) and to send procedure call in parallel. For each call we fill the input for each individual product by dynamic parameter and insert all the output into one table adding ID for identify forecast of each product.

    I have no more idea to parallel it by SQL procedure itself in SAP HANA.

    Hope this can help you!

    Best Regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.