Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all 9165 articles
Browse latest View live

Re: reset_by on hdbsequence artifact

$
0
0

Another update - if I delete the hdbsequence file, activate the deletion (effectively dropping the sequence from the database), then re-add the hdbsequence file - it works. 

 

It appears to be an issue with the reset_by implementation on our HANA revision.


Re: How to Transport Hana Studio developments Calculation, Atribute and Analytc View ?

$
0
0

Thanks for the question.

 

I would like to clarify one point that in either case after the objects are moved from one system to another, say from Dev to Test system, we need to maintain the schema mapping as well because the objects developed in Dev with given table resides in the Dev Schema but in Test system the schema would be different and hence authoring schema would be Dev Schema and Physical schema would be Test Schema in the Test system.

 

Do anybody have any comment on this?

Complex logistic regression models in HANA PAL

$
0
0

Hi,

 

I am trying to perform a logistic regression with SAP HANA PAL (without using an R server!!) and would need your help on two questions:

 

1.) Is there any possibility to add interaction terms to the model? I understand how to formulate models such as

 

glm(TYPE ~ X1+X2+X3, family=binomial(logit),data=dataset)

or

glm(TYPE ~ X1+X2+as.factor(X3), family=binomial(logit),data=dataset)

in HANA PAL but I am not able to calculate a model like:

glm(TYPE ~ X1*X2*X3, family=binomial(logit),data=dataset)


Is there an option that I did not find or do I have do construct the independent variables myself (i.e. in this case additional columns with the independent variables being multiplied)?

 

2.) For the "multiple linear regression" there is the parameter ADJUSTED_R2. There does not seem to be an option to return AIC or anything similar to evaluate the goodness of fit for the logistic regression. How can I get these statistics using only HANA PAL?

 

Thank you very much

Re: Export to Excel in XS Project

$
0
0

Hi Thomas -

 

While doing this, can we also format the data before putting it in excel. For ex - Instead of using dot as decimal separator, can we change it to comma or vice-versa.

 

regards

Amit

Re: Analytical view error :name clash among columns,

$
0
0

Hi Laksh,


if u want duplicated one you have to create calculated column

on which one u want duplicate values that may be ur wish (on attribute view  level or in analytic view data foundation)


Regards,

V@li

Re: Input Parameters in Scripted Calculation Views

$
0
0

Hi Lars,

 

Here you go:

 

1) I create an Input Parameter in a scripted CalcView:

 

1.PNG

 

Mandatory cannot be unchecked (as opposed to graphical CalcViews)

Default Value cannot be made active (as opposed to graphical CalcViews)

 

2) Script Node

 

/********* Begin Procedure Script ************/

BEGIN

 

            it_data =

            select SESSIONID, ITEM from KXEN"."afm.data::ViewAprioriCusttx_01"                             

            where "Customer" = :in_Customer;                          

 

            var_out = select SESSIONID, ITEM, 2 as TWO from :it_data;      

                 

 

END /********* End Procedure Script ************/

 

 

 

Executing the report works if a customer is chosen (here = 23). But what if the user shall also have the possibility to leave the customer blank?

 

2.PNG

 

Choose nothing is not allowed, since the input parameter is mandatory:

 

3.PNG

 

If one chooses null, ...

 

4.PNG

 

... we get an error:

 

5.PNG

 

3) Try the thing with APPLY_FILTER, but what to pass over, if the value should be blank?

 

/********* Begin Procedure Script ************/

BEGIN

 

declare lv_search_string nvarchar(256);

 

lv_search_string := '"Customer" =' || :in_Customer;

 

it_data = apply_filter("KXEN"."afm.data::ViewAprioriCusttx_01",:lv_search_string);

 

var_out = select SESSIONID, ITEM, 2 as TWO from :it_data;                      

 

END /********* End Procedure Script ************/

 

shows exactly the same behavior as the first code example.

 

I also tried search strings like, but this did not work neither:

 

lv_search_string := '"Customer" !=''';

 

 

Regards and thanks,

Ingo

Re: HEX String to INTEGER conversion

$
0
0

To help myself with an interim solution I came up with the following procedure to convert a HEX string to BIGINT:

 

CREATE PROCEDURE hex2int (IN i_hex VARCHAR, OUT o_result BIGINT) 

LANGUAGE SQLSCRIPT 

SQL SECURITY INVOKER AS

  pos INTEGER := 1;

  hex_len INTEGER;

  current_digit CHAR;

  current_val INTEGER;

  result BIGINT := 0;

BEGIN

  DECLARE hex2int CONDITION FOR SQL_ERROR_CODE 10001;

  DECLARE EXIT HANDLER FOR hex2int RESIGNAL;

  hex_len := LENGTH(:i_hex);

  WHILE pos <= hex_len DO

       result := result * 16;

       current_digit := SUBSTR(:i_hex, pos, 1);

       -- format checking

       IF NOT ((current_digit >= 'A' and current_digit <= 'F') or

              (current_digit >= '0' and current_digit <= '9')) THEN

          SIGNAL hex2int SET MESSAGE_TEXT =

                'Invalid hex cipher: ' || current_digit || ' at position ' || pos;

       END IF;

       current_val := MOD(to_number(to_binary(current_digit)),30);

       IF current_val >= 11 THEN

            result := result + current_val - 1;

       ELSE

            result := result + current_val;

       END IF;

       pos := pos + 1;

  END WHILE;

  o_result := result;

END;

Test Call:

CALL hex2int('FF', ?);

 

Any hints to express this typconversion directly without using a stored procedure?

cant see variables in hana stored procedures debug mode

$
0
0

Hi

 

we cant see the variables while debugging the hana stored procedures

could any one let us know if we miss anything here

 

debug2.png

debug1.png

 

thanks


Re: Connecting JS and HANA Tables

How to change the connection information of a crystalreport configured against HANA.

$
0
0

Hi,

 

We have a crystalreport in which datasource is connected to HANA ODBC, we have 3 schemas and each contain table named OCPR.

Report is configured agianst OCPR in the 3rd schema, but when the report is executed (using .Net crystalreportviewer and ReportDocument) data is showing from the 1st schema.

 

How can we change the schema and server information through code (.Net).

 

I have tried the below given code from the link http://scn.sap.com/thread/3481487, but its not changing the connection information.

 

CrystalDecisions.CrystalReports.Engine.ReportObjects crReportObjects;

 

    CrystalDecisions.CrystalReports.Engine.SubreportObject crSubreportObject;

 

    CrystalDecisions.CrystalReports.Engine.ReportDocument crSubreportDocument;

 

    CrystalDecisions.CrystalReports.Engine.Database crDatabase;

 

    CrystalDecisions.CrystalReports.Engine.Tables crTables;

 

    TableLogOnInfo crTableLogOnInfo;

 

 

 

    CrystalDecisions.Shared.ConnectionInfo crConnectioninfo = new CrystalDecisions.Shared.ConnectionInfo();

 

         

 

    //set up the database and tables objects to refer to the current report

 

    crDatabase = rpt.Database;

 

    crTables = crDatabase.Tables;

 

    bool mainSecureDB;

 

 

 

    //loop through all the tables and pass in the connection info

 

    foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)

 

    {

 

        mainSecureDB = rpt.Database.Tables[tableIndex].LogOnInfo.ConnectionInfo.IntegratedSecurity;

 

        string mainTableName = crTable.Name.ToString();

 

        tableIndex++;

 

        //pass the necessary parameters to the connectionInfo object

 

        crConnectioninfo.ServerName = "Hana"; // Your DSN

 

        if (!mainSecureDB)

 

        {

 

            crConnectioninfo.UserID = "YourUserName";

 

            crConnectioninfo.Password = "YouPassword";

 

            crConnectioninfo.DatabaseName = "XTREME.CUSTOMER"; // Your DB and table

 

        }

 

        else

 

            crConnectioninfo.IntegratedSecurity = true;

 

 

 

        crTableLogOnInfo = crTable.LogOnInfo;

 

        crTableLogOnInfo.ConnectionInfo = crConnectioninfo;

 

        crTable.ApplyLogOnInfo(crTableLogOnInfo);

 

 

 

Thanks

Re: cant see variables in hana stored procedures debug mode

$
0
0

What version of Studio are you running?  When i use my 72 studio on our 68 server I have issue where sometimes (randomly) the variables disappear.  ie: they will disappear for one line breakpoint and then appear again for the next.  Making it very tricky and annoying to debug!  The way I get around it is by inserting lots of dummy lines in the code and setting a bunch of extra breakpoints. 

 

ie:

debugStopHere := 'y';

debugStopHere := 'y';

debugStopHere := 'y';

 

Just for curiousity sake you can try entering a few fake lines below your select and put a breakpoint on each line then step through and see if it appears for any of them?  At least then we will know that it is capable of appearing at least some time.  The good news is I have another rev 82 database with 82 studio and I do not experience this same problem.  I definitely found rev 68 and 72 very buggy with the debugger.  ie: sometimes I also set the break point on a certain line and it inserts the breakpoint on the line after which is also very annoying.

 

-Patrick

Floating Element(s) [Projection_2_1] found in this Calculation Scenario.

$
0
0

When i validate the calculation graphical view the error is popping out

 

"""Floating Element(s) [Projection_2_1] found in this Calculation Scenario."""""

 

The project_2_1 is attribute view.

Data Modeling

$
0
0

Hi All,

 

While creating attribute/calculation view, I am facing difficulty in applying multiple filter on the same column

for example: where a <> 'Y' or a is Null .

How should I apply the same while creating a calculation view since we can apply only one filter  after selecting the column from the table available in data foundation.

and also applying "group by" clause in any modelling view.

 

 

Thanks a lot

 

Regards/ Rahul Anand

Re: cant see variables in hana stored procedures debug mode

$
0
0

we are using eclipse Kepler 4.3 and installed the kepler plugins for Hana from sap ondemand site and the version is 1.8

we also tried keeping break points on multiple lines with no luck, the variable screen is always blank

 

thanks!

Re: Input Parameters in Scripted Calculation Views

$
0
0

Ok, but I do not manage to get your example

 

/********* Begin Procedure Script ************/

BEGIN

mytab = select user_name from users;

var_out = apply_filter(:mytab, :userNameFilter);

END

/********* End Procedure Script ************/

 

running with the apply_filter syntax and with input parameter userNameFilter and value blank (i.e. '').

 

The placeholder variant might work, but then

 

1) we have a variable and hence the corresponding attribute has to be part of the output of the CV in order that the variable can be created,

2) the source ("_SYS_BIC"."LBPB/SCV_USERS" in your example) has to be a HANA view and cannot be a table or a database view.

 

Regards,

Ingo


Re: Input Parameters in Scripted Calculation Views

$
0
0

The filter was using an input parameter. not a variable.

 

Your second point doesn't make any sense to me. Of course this approach has to be a information model. Regular tables or views don't accept parameters.

Still not sure, what you actually want, I guess...

HANA sizing in real world

$
0
0

As we all know that SAP HANA consumes memory during runtime of report depending on a) modeling is done in HANA (again Gui,SQL Procedures) , BW (7.3 Vs .4), or mixed (both native + BW) b) depending on end-to-end design SAP HANA thru BO (How BO is interacting with HANA, traffic in between, also logic in BO) C) multi-node vs single node  - HANA production landscape (scale out  vs scale up architecture) The standard quick sizer shows the estimated static memory of HANA is equal to dynamic HANA memory for sizing, in reality it is not sufficient. Especially if the data foot print (after compression) is very less (just take example - 125GB data foot print out of 250GB HANA ), and HANA with 250GB might not support if the users are running multiple concurrent reports with complex native modeling. There are various scenarios mentioned in above could also contribute the overall HANA sizing. There are no standard document take into consideration during the sizing to convince the customer about the requirement of HANA dynamic memory vs showing quick size in HANA per SAP provided documentation. i appreciate help from SAP referencing the documentation as customers need authentic information regarding dynamic memory prospective as this is important factor in sizing needs and to make successful production implementations in HANA. Thanks Ravi Appala

Re: Input Parameters in Scripted Calculation Views

$
0
0

You can use wrapper on Script View, and work around the situation. Wrapper also helps to have better interface with BO, where you can manage lot of BO specific features with BO variables, mapping, business user friendly names etc..

Re: Use of input parameter

$
0
0

you can use default to work around and also not to impact other situations.

Re: Push notification

$
0
0

Only in SP9 (coming in few weeks) - WebSockets support will be introduced.

Viewing all 9165 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>