Why does the user need write permission at the location of the external hive table?

In Hive, you can create two types of tables: Managed and External

In the case of a managed table, you own the data, and therefore data is deleted when the table is deleted.

In the case of an external table, you do not have ownership of the data, and therefore, when you delete such a table, the underlying data is not deleted. Only metadata is deleted.

Now, recently, I noticed that you cannot create an external table above a location where you do not have write (change) permissions in HDFS. I do not fully understand this.

Use Case: It is quite common that the data you whip is huge and read-only. So, in order to drop such data through Hive, do you have to copy this huge data to the place where you have write permissions?

Please, help.

+4
source share
1 answer

Although it is true that deleting external data does not discard data, this does not mean that external tables are read-only. For example, you should be able to do INSERT OVERWRITE in an external table.

You can also use (internal) tables when you only have read access, so I suspect this applies to external tables as well. Try creating a table with an account that has access to the record, and then use it with your regular account.

0
source

Source: https://habr.com/ru/post/1262831/


All Articles