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.
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