Support Questions
Find answers, ask questions, and share your expertise

Hive - rights to create a table

Hive - rights to create a table

Contributor

Hi,

I would like to create a user that can read/write/create tables in a database. I am using a role ("developer") so that every user who has this role, can read/write/create tables in a database.

I executed the following code :

-----------------------------------------

create role developer;

grant developer to user user1;

create database db1;

alter database db1 set owner role developer;

grant all on database db1 to role developer;

-----------------------------------------

But with this :

- user1 cannot create a table in db1

- user1 cannot read tables in db1 unless I grant the user on the table

Is there a way to give all the privileges to a role so that every user who has this role can read/write/create tables in a database?

Do I have to grant every user on a table? If the user has the grant at the database level he should have the same grant by default on every table of the database no?

2 REPLIES 2
Highlighted

Re: Hive - rights to create a table

Super Guru

@Raphaël MARY

what is the value of hive.security.authorization.createtable.owner.grants in your hive-site.xml? By default this is null, which basically means owners by default don't have all the access.

Highlighted

Re: Hive - rights to create a table

Contributor

@mqureshi

Hi, the variable hive.security.authorization.createtable.owner.grants is not in the file hive-site.xml.

However I noticed there is a difference between create table and create external table.

I am able to create an interne table but cannot create an external table : in the last case, I have to be owner of the source file.

Is that right?

Is there a way where I can be member of the group of the source file and not owner?