on 06-06-2016 4:51 PM
Hi,
I have a question about using HANA sql script in calculation view for BW.
I'm trying to move the logic from application server to HANA DB. And I'm trying to find some objects to process data row-by-row like LOOP in internal tables in ABAP.
The task is to realize some complex logic - to read data from 3 DSO, to calculate some fields, check some conditions and delete some strings in the result and so on.
I've read most of the topics founded by search on "temporal tables in calculation view", "loop in calculation view" and so on. And i've made several experiments.
From them i understood that:
I understand that using joins and unions is preferable variant, but I think that my task really could not be solved by joins and unions.
Before HANA on classic BW I used a "virtual cube" technology for such tasks. I can return to processing data in ABAP in virtual cube for current task.
But before doing this, I'd like to ask: have I understood correctly that the variant with arrays from that blog is the only one possible variant of realizing "internal tables" in calculation views?
If there are other variants, I'd be very glad to get some links to read, keywords, ideas and so on. Thanks.
Still actual. Would be glad for any information or advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Evgeny,
SAP suggests avoiding using cursors with loops in the first place. By the way this is officially public here:
SAP HANA SQLScript Reference - SAP Library
Using plain SQL (avoiding row-by-row processing) is where we see the best performance (if that's what's driving you now). So you might want to check if your implementation can benefit from that instead.
If not, then why push it to HANA? Although we hear lots of fuzz about pushing logic to HANA, app server implementations are still necessary and will offer a better toolset to developers (generally speaking). Specially in row-by-row processing.
BRs,
Lucas de Oliveira
Hello Lucas,
I had two main reasons to push it to HANA. The first one - in BW for processing data by ABAP in queries we should make a virtual cube or virtual characters/key figures. It is well-known but quite complicated technology. I hoped that pusing this logic to HANA would make the process easier. The second reason - to save time in sending data from DB to app.server. For example, in one of my task i should make a selection of data and than delete more than 90% of lines according to some conditions. If i check these conditions in app.server, all initial selection of data will be sended from DB. If i check them in DB, only result will be sended and the volume of data will be 10 times smaller.
The idea in your link is clear, but they selected several simple examples and show that it's better to use plain SQL instead of coursors. Of course it's better when it's possible. But in some task working only with plain SQL is very difficult or even impossible. It just looks a little strange - there is opporunity to work with temporal tables in HANA but it is closed for using in calculation views (and therefore in BW).
But anyway thanks a lot for your answer.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.