hana

Issues connecting R to HANA db with many special characters

大兔子大兔子 提交于 2019-12-13 03:47:29
问题 I am having issues with reading HANA data into R. I have established my connection via ch <- odbcConnect("HANA",uid="USER",pwd="PW") And confirmed I am connected via sqlTables(ch) which pulls up my list of tables. Filtering on my desired table I am trying to pull reveals the full name to be "ccf-edw.self-service.MDM::Q_CA_R_CUSTOMER_REPORTS" From other posts I have seen, there appear to be issues surrounding the periods. Attempting sqlQuery(ch, 'SELECT TOP 10 FROM "_SYS_BIC"."ccf-edw"."self

SAP HANA alternative for cross apply

心不动则不痛 提交于 2019-12-12 11:31:58
问题 Is there an alternative in HANA sql for the "cross apply" operator as available in MsSql? Or is there a way to apply a function for values in a table? Something like select T.*, F.* from T cross join someFunction(T.Value) F 回答1: You can use the cross join in SAP HANA, that's not a problem. However, if you want to apply a function to all entries of T.VALUE then the query needs to look like this: select T.*, someFunction(T.Value) from T cross join F 来源: https://stackoverflow.com/questions

What is the meaning of 'controlAggregation' in the SAPUI5 routing configuration?

ε祈祈猫儿з 提交于 2019-12-12 10:46:36
问题 I really don't get what the property controlAggregation below does for routing a SAPUI5 application. There is not element with that id. I cant find any reference to 'pages' anywhere in the demo app found here: SAPUI5 routing demo "routing": { "config": { "routerClass": "sap.m.routing.Router", "viewType": "XML", "viewPath": "sap.ui.demo.nav.view", "controlId": "app", "controlAggregation": "pages", // what does this do? "transition": "slide", "bypassed": { "target": "notFound" } The views are

From Clause in RODBC Quotations - SAP HANA

久未见 提交于 2019-12-12 10:21:07
问题 I cannot seem to get the below FROM clause to work using RODBC's sqlQuery . I have taken the advice of @Lars Br. in terms of the quoting but it still does not work. I am I know the placeholder piece works as I have used this in qlikview Extracting Table from HANA using R So the below code works table <- sqlQuery(myconn, 'SELECT * FROM "_SYS_BIC"."mytable.TABLE/ALL_DATA"') But when I try to add the following (I am passing my date parameters in) table <- sqlQuery(myconn, 'SELECT * FROM "_SYS

SAP HANA getting csv data size

心不动则不痛 提交于 2019-12-12 04:32:31
问题 I am working with SAP HANA I would like to know if it is possible to get disk size of csv data with sql. The csv data that i mean is the file \index\SCHEMA NAME \CL\TABLE_NAME\data.csv after export. Best Regards Houssem 回答1: Nope, there is no way to generate this directly.\ You could, however, do some rough estimation, by looking at M_CS_COLUMNS to see the estimated uncompressed size for each column. Then you could add six bytes (double byte encoding) for every column * no. of records to

“first argument“ error when using shinyapps.io, rodbc to show sql query result in web

纵饮孤独 提交于 2019-12-12 04:26:02
问题 First of all, I need to use R to get SQL query result from HANA database, which I finish by using RODBC in Rstudio. Second of all, I need to share my code with others, which I use shinyapps.io to finish. However, I need to use shinyapps to show my SQL query result on other computers, which I have the following error message: error first argument is not an open rodbc channel I used the answer from R shiny RODBC connection Failing, but it still does not work. Here is my codes for ui.R and sever

How to get the transpose in sql (HANA)?

三世轮回 提交于 2019-12-12 03:40:01
问题 I have a query which returns the table which is like SELECT (CASE WHEN type=1 THEN 'A' WHEN type=2 THEN 'B' END) as TYPE,COUNT(*) AS COUNT from TYPE_TABLE GROUP BY TYPE (I use case to have the count in each types). count type _____ _____ 123 A 124 B 120 C I want to have the table to be like this A B C ___ ___ ___ 123 124 120 So actually I need the transpose of the column count.How do I get this in HANA? 回答1: A pure SQL solution ( SQL Server ) select [A] , [B] , [C] from ( select Type,[Count]

SAP HANA Authorisation Error: SAP DBTech JDBC: [258]: insufficient privilege: search table error: [2950] user is not authorized

喜欢而已 提交于 2019-12-12 03:02:29
问题 At the moment I try to understand SAP HANAs authorisation concept. I assigned the analytic user the following rights: select on _SYS_BI, _SYS_BIC execute on REPOSITORY_REST root package: REPO_READ If I create an analytic privilege on an information view and assign this privilege to the user then the user is able to query the information view. On the other hand the modeller does not need this analytic privilege to query the information view. So there must be another way to allow the user to

Is it possible bulk insert in HANA?

回眸只為那壹抹淺笑 提交于 2019-12-12 01:23:39
问题 I want to insert into hana by bulk.Currently I am using Java to insert line by line from the result set.Is there a way to insert multiple rows at a time? Is it possible to do? (I do not want import only bulk insert) I searched all over and could not find any good answer.Any help is appreciated? 回答1: For JAVA/JDBC code, there exists the so-called batch interface. Here's an old example that I used for testing: myDBconn.setAutoCommit(false); PreparedStatement insStmt = myDBconn .prepareStatement

SQL BETWEEN in HANA

做~自己de王妃 提交于 2019-12-11 19:11:20
问题 I have to write a condition where I have to check a "DATE" lie beween two other date values as shown in the example: var_out= CE_PROJECTION(:table1,["col1","col2","col3","col4"], ' " col2" BETWEEN "col3" AND "col4" ' ); But this throws me an error SQL: transaction rolled back by an internal error: Syntax Error in filter expression Could anyone suggest the right syntax for this? Thanks 回答1: Between is not supported in the filter expression of CE_PROJECTION. You can try var_out= CE_PROJECTION(