on 05-14-2015 9:52 AM
Hello All,
I am currently part of a POC related to HANA-Sybase Integration.
We need huge amount of data to be loaded into some HANA tables(in fact 5 tables shown below).
Currently the record count in the tables are:
DIVIDEND_EVENT 387
SPLIT_EVENT 11005
STOCK_HISTORY 2840000
STOCK_QUOTE 11548892
STOCK_TRADE 5775442
The data needs to be increase proportionally across the 5 tables to ~2 billion rows in the STOCK_TRADE table.
All the tables have a common object between them, which is INSTRUMENT_ID(Commodity Market scenario)
Another constraint here is the data must be consistent (referential integrity to be maintained) between the INSTRUMENT_ID of the tables.
The current record count is related to year 2005. When I increase the data set, I need to uniformly distribute it across 10 years(2005-2015)
I wanted your help in deciding a Best/recommended approach by which we can load such massive meaningful dummy data into HANA tables.
Has anyone faced a similar situation somewhere?
PS: The above shown records were loaded though various CSV files into HANA by some other colleagues of mine, couple of years ago.
These CSV files are readily available with me.
Some thoughts from our side on the solution side: Excel formulas/Macros- Import/Export CSV Files; SQL procedure; Scripting at HANA Linux side..
BR
Prabhith
Hello Prabhith,
I am not familiarized with HANA SQL but I have few years of development and migration experience.
If I were you I would write similar INSERT SQL statements like below for all tables to increase the number of rows.
You can add YEAR * 1000000 to INSTRUMENT_ID in order not to make ID duplicate. You can decide number of 0s according to the length of field..
INSERT INTO TABLE DIVIDEND_EVENT (INSTRUMENT_ID, YEAR , FIELD3 )
( SELECT INSTRUMENT_ID + 200600000 , 2006, FIELD3 FROM DIVIDEND_EVENT WHERE YEAR = 2005)
INSERT INTO TABLE DIVIDEND_EVENT (INSTRUMENT_ID, YEAR , FIELD3 )
( SELECT INSTRUMENT_ID + 200700000 , 2007, FIELD3 FROM DIVIDEND_EVENT WHERE YEAR = 2005)
INSERT INTO TABLE DIVIDEND_EVENT (INSTRUMENT_ID, YEAR , FIELD3 )
( SELECT INSTRUMENT_ID + 200800000 , 2008, FIELD3 FROM DIVIDEND_EVENT WHERE YEAR = 2005)
... an for the other years.
Similar INSERTS for other SPLIT_EVENT, STOCK_HISTORY, STOCK_QUOTE, STOCK_TRADE tables, too.
Hope this helps.
Using excel is tiring and time consuming in my opinion and experience.
Whenever there are alotof records in an excel file and you are using macros, formulas you need big memory and alotof time.
Regards,
Yuksel AKCINAR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.