cancel
Showing results for 
Search instead for 
Did you mean: 

problem creating hdbview

Former Member
0 Kudos

Anybody who has followed this video http://www.saphana.com/docs/DOC-3019 , encountered the below errors?

and

I am using the below code to make the view-

schema="SessionAtul";

query="select T0.\"OrderId\",

              T1.\"OrderItem\",

              T0.\"CreatedBy\",

              T0.\"CreatedAt\",

              T1.\"ProductId\",

              T1.\"Quantity\",

              T1.\"QuantityUnit\"

        from \"SessionAtul\".\"workshop.sessions.system.data::header\" T0

        left outer join \"SessionAtul\".\"workshop.sessions.system.data::item\" T1

        on T0.\"OrderId\" = T1.\"OrderId\"

        order by T0.\"OrderId\" ASC";

        depends_on_table =["workshop.sessions.system.data::header","workshop.sessions.system.data::item"];

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Can you please post the details of the 2nd error message in your Errors view. The first one isn't helpful.  It only says that there was a failure creating the synonym for the view - which of course is becuase the view itself didn't get created. The 2nd error message in the list has the actual reason for the cause of the view not to activate.

Former Member
0 Kudos

Hi Thomas,

Thank you so much for taking time to reply. Its a real honor to discuss directly with you

I followed next view in the row to create the hdbrole but even that stuck with an error. I also tried to grant access but nothing helped . Please see the below screen prints-

And when I query into the table which is at public synonym-

And below is the screen shot the error when I try to activate the hdbrole

Thanks,

Atul

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I can't see the whole error message in your screen shot. It is cut off.  Why not right mouse click on the error and choose properties.  Then it will display in a dialog window rather than in the tooltip.  Its easier to see the whole error that way. 

As to your role, the activation error says you are missing the application privilege.  I assume you either didn't create the .xsprivileges at all/in the correct package - or there is some problem with the content of this file.  It should be created in the root of the project and contain the following syntax:

{

    "privileges":[

        {

            "name":"Basic",

            "description":"Basic usage privilege"

        },

        {

            "name":"Admin",

            "description":"Administration privilege"

        }

    ]

}

Former Member
0 Kudos

Ok,

Here are the error descriptions-

"Repository: Internal error during statement execution, please see the database error traces for additional details;invalid column name: T1.QuantityUnit: line 7 col 9 (at pos 205) at ptime/query/checker/check_expr.cc:604,CREATE VIEW "SessionAtul"."workshop.sessions.system.data::ordersExt" AS select T0."OrderId",nttt  T1."OrderItem",nttt  T0."CreatedBy",nttt  T0."CreatedAt",nttt  T1."ProductId",nttt  T1."Quantity",nttt  T1."QuantityUnit"nttfrom "SessionAtul"."workshop.sessions.system.data::myheader" T0nttleft outer join "SessionAtul"."workshop.sessions.system.data::item" T1ntton T0."OrderId" = T1."OrderId"nttorder by T0."OrderId" ASC"

AND

"Repository: Internal error during statement execution, please see the database error traces for additional details;invalid synonym: target object does not exist: line 1 col 84 (at pos 83) at ptime/query/checker/check_synonym.cc:104,CREATE PUBLIC SYNONYM "workshop.sessions.system.data::ordersExt" FOR "SessionAtul"."workshop.sessions.system.data::ordersExt""

and here is the code which I am using in my hdbview

schema="SessionAtul";

query="select T0.\"OrderId\",

              T1.\"OrderItem\",

              T0.\"CreatedBy\",

              T0.\"CreatedAt\",

              T1.\"ProductId\",

              T1.\"Quantity\",

              T1.\"QuantityUnit\"

        from \"SessionAtul\".\"workshop.sessions.system.data::myheader\" T0

        left outer join \"SessionAtul\".\"workshop.sessions.system.data::item\" T1

        on T0.\"OrderId\" = T1.\"OrderId\"

        order by T0.\"OrderId\" ASC";

        depends_on_table =["workshop.sessions.system.data::header","workshop.sessions.system.data::item"];

Also, below is the screen print of the privilege

Thanks,

Atul

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The key to the error message is here:

invalid column name: T1.QuantityUnit

So the view says QuantityUnit doesn't exist in the item table.I can't see your item table to confirm, but perhaps you just have a typo in this column definition when you created the table.

As far as your role, the privilege file looks fine.  I believe its actually your role definition which is wrong.  You referenced the application privilege as workshop.sessions.system.data::Basic. But your .xsprivileges file is in the project root folder not the data folder and therefore the package path should be workshop.sessions.system::Basic.

Former Member
0 Kudos

Hi Thomas,

A Big Big Thank you for all your help in this

I am all set to move to next video now...

And I am feeling kind of guilty for these kind of stupid mistakes and not trying to figure out the solution by myself. I mean those all were just silly  mistakes which I did...

Thank You once again.

Regards,

Atul

Former Member
0 Kudos

Hi Atul,

Can you kindly explain how u have got through the error as I am facing the same error..

Thank you

Ranga

Former Member
0 Kudos

Hi,

Try to look for the error details. You will find the solution in the error description.

Regards,

Atul

Answers (0)