on 10-31-2012 8:40 AM
I want to connect to HANA via ODBC from MS-Access. By doing this I can see TABLEs and write Access Queries to get data. But what I really would want is to connect to VIEWS (instead of Tables) - but Views do not show up in my ODBC list of "tables" to connect to. Is there any way to do this? (I have searched everywhere and my onw IT has no answers.)
Thanks
Here is another idea. Suppose I could send the output of a Calculated or Analytical View to a user table within HANA, then I could read that new table from MS-Access. Is there any way to redirect a View to write to a HANA-User created table?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ira,
I think you can write a procedure / SQL statement with "Insert" into a User defined table in HANA with SELECT from the Calc / analytic view.
Alternatively you can write a procedure with CE functions to implement the functionality of Calc / Analytic view and then insert into a user defined table.
But, why do you need to build a calc / analytic view on "tables" and write to another "table". You can always use the underlying base table and fire select statement against it. Unless you have heavy summarization / aggregation to be performed and need the processed data to be inserted into another table. Still I am not very much convinced, but then I also do not know the exact requirement.
Regards,
Ravi
Thanks Ravi, for your quick response.
You are correct, that I have some complicated joins, filters, aggregations and find the Calc Views easier to build than SQL statements.
By any chance would you have a sample procedure with a single sample SQL statement. I have played with this a little but always seem to get the nomenclature on calling the tab;les & views wrong. I've struggled with this.
Thanks again.
What is wrong with this query:
SELECT MATNR from "pk-users"."pk-pricing"."CA_IJL_BASE_MM" into LUNDIJ.Z_GPT_TEST;
Both the Calc View and the table exist. I think the nomenclature around the view and table are wrong. The trees are like this:
Catalog-> LUNDIJ -> Tables -> Z_GPT_TEST
Content -> pk-users -> pk-pricing -> Calculation Views -> CA_IJL_BASE_MM
Thanks.
Just tried chaging LUNDIJ/Z_GPT_TEST to "LUNDIJ"."Z_GPT_TEST" and now get this error:
"feature not supported: INSERT/UPDATE/DELETE are not supported in the READ ONLY procedure/function: .."
maybe nomenclature for table is now correct - but for some reason the table is marked as read only? but it says procedure is read-only. Can I change that?
Hi,
Following statement works fine for me:
insert into ravi.ZTEST_TAB_03 (B, C, A)
SELECT "B1", "B2", "A1" FROM "_SYS_BIC"."ravihana.testview/ZTEST_CALC_VIEW_03";
Here ZTEST_TAB_03 is a user defined table with columns A, B and C and these are filled from output of a Calc view ZTEST_CALC_VIEW_03 which has attribs B1, B2 and a key figure A1
Please use appropriate tables and columns from your user defined tables / calc views and try it.
Hopefully like this:
INSERT INTO "LUNDIJ"."Z_GPT_TEST" (MATNR)
select MATNR from "_SYS_BIC"."pk-users.pk-pricing/CA_IJL_BASE_MM";
Regards,
Ravi
Thnaks everyone, I appriecate all the suggestions. However, I still get the same error message. I now see down in the Properties box that Access Mode is set to Read only within the procedure and there is no option that allows me to change this. Perhaps I have to get IT to give me write security? Or is it really unchangebale?
I was talking to my IT - pretty well seems to be security issue - and they aren't up to granting me the security. But just in case here is the entire procedure:
/********* Begin Procedure Script ************/
BEGIN
END
/********** End Procedure Script ***********/
INSERT INTO "LUNDIJ"."Z_GPT_TEST" (MATNR)
select MATNR from "_SYS_BIC"."pk-users.pk-pricing/CA_IJL_BASE_MM";
Well,
Your procedure code is empty as you wrote the INSERT statement outside the procedure body.
Can you please try the following
DROP procedure PR_INSERT_DATA;
CREATE PROCEDURE PR_INSERT_DATA(
in v_matnr varchar(15) -- currently not used in procedure, for future use, if any
)
LANGUAGE SQLSCRIPT
AS
BEGIN
INSERT INTO "LUNDIJ"."Z_GPT_TEST" (MATNR)
select MATNR from "_SYS_BIC"."pk-users.pk-pricing/CA_IJL_BASE_MM";
END;
call PR_INSERT_DATA('');
Regards,
Ravi
Sorry, this web site is very sluggish for me - I think it is all the filters IT has. And copy & paste does not seem to work - so I end up retyping a lot of stuff. The code is actually inside the procedure correctly.
I executed the code you gave me in the SQL editor - here are the results - but not sure what it is supposed to do. I see a new procedure -> Table Types -> PR_INSERT_DATA - but not sure what this is.
Statement 'DROP procedure PR_INSERT_DATA' successfully executed in 27 ms 255 µs - Rows Affected: 0
Statement 'CREATE PROCEDURE PR_INSERT_DATA( in v_matnr varchar(15) -- currently not used in procedure, for ...' successfully executed in 95 ms 429 µs - Rows Affected: 0
.. Welcome to the world of HANA developers. I am sure if we keep in touch for few more days, you'll start advanced coding for yourself.
Well, I gave the code for creating the procedure and executing it.
The drop procedure statement drops any existing procedure with name PR_INSERT_DATA.
Second part creates the Procedure which takes MATNR value as input. Currently it doesn't do anything. The procedure code will insert the data to your table from the Calc view when you execute the procedure with the CALL statement.
You did not mention if that statement was executed successfully. Can you please try it. But before you execute that, can you please execute the following statement.
select count("MATNR") from "LUNDIJ"."Z_GPT_TEST";
Please run this after the call statement also to check if the data is actually inserted to the table.
Regards,
Ravi
Is there any way to submit a request to SAP to have them make Views accessible via ODBC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ira,
I can only imagine this is because HANA as of now haven't officially certified MS-Access to be used as a client and hence would not provide access to column views via the ODBC interface. Have a look at note 1577128.
I had a similar issue while connecting Cognos to HANA as part of a proof of concept exercise wherein only tables could be selected but no column views. As a work around we ended up creating database views under the schema (not column views) and that worked. However, as expected performance was poor as they wouldn't use the super fast olap, join and calculation engines of HANA.
Thanks,
Anooj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HANA does have ODBC support, just check C:\Program Files\SAP\hdbclient (if you have x64 clients installed).
For instance, BO Analysis Office for MS Excel uses it, and you can browse content views from it.
I suppose it does require some special navigation capability to see the Analytic/Calc Views as Data Sources that Cognos hasn't done yet.
But if it works for MS Excel/Word/Powerpoint, I'd expect it to work for MS Access as well. Strange.
ODBO is used by native MS Office 2010 Data Sources instead.
SAP Note 1577128 has ODBO twice as a supported client, I suppose it's a typo and one of them was supposed to be ODBC.
BTW, I reached the developers responsible for the note, and they've corrected it.
It now says:
SAP HANA additionally provides open interfaces#
* HANA provides the following standard interfaces for connectivity:
- ODBC
- JDBC
- ODBO
- SQLDBC
One thing you could do is:
1) connect an Excel sheet to HANA view through BO Analysis for MS Excel (or ODBO);
2) create an Excel Data Source on MS Access and import (or link) it to an Access table.
It's not ideal, but it worked for me.
Make sure to select "Repeat Members" in BO Analysis for MS Excel, under the Analysis view, Components tab, and selecting your Crosstab, or else you'll get empty records in Access.
I am a Pricing Analyst and we must maintain price records. Just for one simple example: we have about 150K skus with 25 price lists globally and even when I download a single price list with abt 25-30 columns Excel BO can't handle it. During a price increase we need to review all skus (not just select few or summary) but we may group certain products based on certain columns and apply various % increases - or we might even review afterwards and adjust indidviual skus. So we do lots of analytics similar to this on large volumes of data. Access is the perfect place to work this kind of stuff. Connecting to HANA Tables is so much better than our current manual method - but HANA-Views would really be out-of this world!
I've found some messages regarding this limitaton on the number of rows on AAO:
http://scn.sap.com/thread/1870824
http://scn.sap.com/thread/1970267
Apparently it's manageable.
Well, I had already tried the Regedit method without much success. Although I can get over 500K cells, it still crashes with the amount of data I am after - as well as much slower than my Access Queries against HANA Tables. I will be fine with the Tables - just kept hoping that I would be able to use Views via ODBC.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.