cancel
Showing results for 
Search instead for 
Did you mean: 

Export DATA from HANA Calculation view into Database tables

0 Kudos

Dear Experts,

I'm aware that the Calculation view is read only, but there is a requirement in my project where in I need the DATA that the Calculation view displays in the Data Preview to be loaded to another database table. Is this possible ? and How ?

All the info and your advises are highly appreciated.

KonradZaleski
Active Contributor
0 Kudos

Can't you just create a procedure with the sql INSERT statement where View will be source and Table destination ?

Accepted Solutions (0)

Answers (4)

Answers (4)

Create a stored procedure with an UPSERT statement on the Calculation view you have created.

UPSERT BASE_TABLE

SELECT * FROM "_SYS_BIC".<CV_NAME>

SergioG_TX
Active Contributor
0 Kudos

to add to what Mustafa mentioned.... with SDI you configure virtual tables from the remote source so no need to replicate data - you would read them virtually as if they were on your system. Depending on where the remote source is (in comparison with your environment), the remote source platform, and volume of data, there may be a performance degradation, however, for the most part, it should allow you to query those remote tables without needing to replicate data

MustafaBensan
Active Contributor
0 Kudos

Hi Mohammed,

You should be able to achieve the desired result by creating a Smart Data Integration (SDI) flowgraph with the calculation view as the source and the table as the target.

Regards,

Mustafa.

FCI
Active Contributor
0 Kudos

Hi Mustafa,

Any particular advantage compared to Konrad's solution ?

MustafaBensan
Active Contributor
0 Kudos

Hi Fréderic,

If the data load is a one-off for test purposes then Konrad’s proposed Procedure solution should work as a quick programmatic approach since the requirement is quite simple. However, for repeatable data loads, especially those involving ETL, I would recommend SDI flowgraphs as this is exactly what the tool is intended for. Furthermore, flowgraphs have the benefit of being defined graphically rather than requiring coding.

Regards,

Mustafa.

SergioG_TX
Active Contributor
0 Kudos

you could create a table with the structure and output from the view as:

create column table <yourTableName> as (select * from "your.view") with data;

if you omit with data if will create the table structure and no data in it

0 Kudos

But suppose if any new entry is made in the original table based on which cal view is created then how would this new entry will get inserted in new table dynamically?

I have a view "CA_PERCENTAGE" built on table "PERCENTAGE" initially with 5 records.Now I created a column table with the SQL you provided ;

create column table "EXPORT1" as (select * from "CA_PERCENTAGE" ) with data;

I insert a new record in table "PERCENTAGE" which is visible in cal view but when not coming in table "EXPORT1"