Skip to Content
0

Path to SQL Object in hdb Role file

Jul 14, 2017 at 03:55 PM

72

avatar image
Former Member

Hi, I am creating an hdb role and I am not sure how to write the path to my SQL object. So my object is a .hdbtable. This is currently not associated with any packages but it is on the USER1 schema. I currently have this on my hdbrole file:

role ICCDataRequest::anonymous { sql object "USER1"."ListCurrentICC_4": SELECT, INSERT, UPDATE, DELETE; }

And the exception says 'invalid reference, package for USER1 missing'

Edit: 'sql catalog object' changed to 'sql object'

10 |10000 characters needed characters left characters exceeded

You are saying that you have created your table using a ".hdbtable" artifact, which is a design time object. The first question is why you are not using the design time object for the role definition (which is the recommended way for design time objects, to avoid issues when the runtime object is created again by an activation).

Regarding the error. Can you explain what you mean with that the .hdbtable is not associated with any package (again, if you really have used a .hdbtable artifact it must be part of a package)? Please share a screenshot (if possible) which shows the definition of your table and the how it is displayed in the schema (in the catalog viewer).

Regards,
Florian

0
Former Member
Florian Pfeffer

Hi Florian,

I imported a table and selected "USER1" as the schema. My table is under Catalog, USER1, Tables, "ListCurrentICC_4".

My .hdbrole file is located in a package, "ICCDataRequest". In here I referred to my table as "USER1"."ListCurrentICC_4".

I am not sure what you mean by using the design time object for the role definition. Could you explain? Alternatively, I could also go on the Web IDE platform and assign the object privileges there. It would still be nice to know how to directly refer to it.

Thank you,

Diana

0

Ok, so you didn't use a ".hdbtable" artifact which would be a design time object. So you have a catalog object only.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Jul 15, 2017 at 09:11 AM
0

As discussed in the comments to your question your table is not defined via a design time object (no ".hdbtable", etc.).

Therefore in your role definition instead of "sql object" you have to use "catalog sql object", because "sql object" can only be used for design time artifact (therefore you get the error message because of the invalid package reference).

The definition should be:

role ICCDataRequest::anonymous { 
    catalog sql object "USER1"."ListCurrentICC_4": SELECT, INSERT, UPDATE, DELETE; 
}

Regards,
Florian

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Florian,

This line definitely works. I am getting some authorization issues (i.e insufficient privilege: Not authorized at (....)). I have searched the forum and found an HCP grant command line. Do you have any advice?

Thank You

Diana

0
Former Member

Or actually, how could I import a data file directly to my package, "ListCurrentICC"? I am trying to move it from the Catalog, Table path, into my package. I am not sure how.

I could create an .hdbtable file in my package and then import all the data into it. However, I do not want to do this as I would need to define all the columns in my data file. Is there a way around this?

0

That are new questions which should be covered in a new question. And PLEASE, create your question which some more infomation. Not just posting an error or a one sentence requirement. Please take the time to describe what you try to do, what steps you execute (which e.g. results in an error). With just an error or just a sentence it is hard to guess what exactly you wanna do.

So if you wanna help, please invest the time to make a good question, so that you can get help!

0