forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
98 lines
11 KiB
HTML
98 lines
11 KiB
HTML
<a name="mrs_01_2352"></a><a name="mrs_01_2352"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Permissions for Tables, Columns, and Databases</h1>
|
|
<div id="body32001227"><p id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_p10913183621217">If a user needs to access <span id="mrs_01_2352__en-us_topic_0000001173789716_text204582182465">HetuEngine</span> tables or databases created by other users, the user needs to be granted with related permissions. <span id="mrs_01_2352__en-us_topic_0000001173789716_text6885174141111">HetuEngine</span> supports permission control based on columns for strict permission control. If a user needs to access some columns in tables created by other users, the user must be granted the permission for columns. The following describes how to grant table, column, and database permissions to users by using the role management function of Manager.</p>
|
|
<div class="section" id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_section114893343138"><h4 class="sectiontitle">Procedure</h4><p id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_p95118346138">The operations for granting permissions on <span id="mrs_01_2352__en-us_topic_0000001173789716_text15303159151116">HetuEngine</span> tables, columns, and databases are the same as those for Hive.</p>
|
|
<div class="note" id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_note949093441314"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_ul185120348132"><li id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_li151243412135">Any permission for a table in the database is automatically associated with the HDFS permission for the database directory to facilitate permission management. When any permission for a table is canceled, the system does not automatically cancel the HDFS permission for the database directory to ensure performance. In this case, users can only log in to the database and view table names.</li><li id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_li11512193419132">When the query permission on a database is added to or deleted from a role, the query permission on tables in the database is automatically added to or deleted from the role. This mechanism is inherited from Hive.</li><li id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_li651213481313">In <span id="mrs_01_2352__en-us_topic_0000001173789716_text15467517161116">HetuEngine</span>, the name of a column of the <strong id="mrs_01_2352__en-us_topic_0000001173789716_b14980141815234">struct</strong> type data cannot contain special characters, that is, characters other than letters, digits, and underscores (_). If the column name of the struct data type contains special characters, the column cannot be displayed on the FusionInsight Manager console when you grant permissions to roles on the <strong id="mrs_01_2352__en-us_topic_0000001173789716_b105141541152315">Role</strong> page.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_section17508144714137"><h4 class="sectiontitle">Concepts</h4><p id="mrs_01_2352__en-us_topic_0000001173789716_en-us_topic_0254454650_p6768114771313"><a href="#mrs_01_2352__en-us_topic_0000001173789716_t61b1f27ae37c4015ac2596a8c29aa39e">Table 1</a> describes the permission requirements when SQL statements are processed in <span id="mrs_01_2352__en-us_topic_0000001173789716_text1011218235113">HetuEngine</span>.</p>
|
|
|
|
<div class="tablenoborder"><a name="mrs_01_2352__en-us_topic_0000001173789716_t61b1f27ae37c4015ac2596a8c29aa39e"></a><a name="en-us_topic_0000001173789716_t61b1f27ae37c4015ac2596a8c29aa39e"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_2352__en-us_topic_0000001173789716_t61b1f27ae37c4015ac2596a8c29aa39e" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Using <span id="mrs_01_2352__en-us_topic_0000001173789716_text19454155417437">HetuEngine</span> tables, columns, or data</caption><thead align="left"><tr id="mrs_01_2352__en-us_topic_0000001173789716_rdc1fc688dee94c5889ee7e14b696ee85"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.3.1.1"><p id="mrs_01_2352__en-us_topic_0000001173789716_a73853cb57d4e48a4bdcb8e088cbb64b5">Scenario</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.3.1.2"><p id="mrs_01_2352__en-us_topic_0000001173789716_ac0e56cc0e1804823af411cc4cb226203">Required Permission</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_2352__en-us_topic_0000001173789716_r00d0944e22f34091bbed52d5ea2d0eda"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a71d1f776660240d1b1b54dc621e4fda3">DESCRIBE TABLE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p034919421215">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r25d6d7ba0dbe4ce08e21461fe1ac0164"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a425150871ee6422a9a05dea904b03bda">ANALYZE TABLE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p23493410128">Select and Insert</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r1d640045fd124559a55badb94a266617"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a2cf7f3ae47c9405ca0516d4cd7cfa35f">SHOW COLUMNS</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p1035012411127">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r75101b83924a45f0afaadf6765077129"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a96d3d002c6bd4bbf920340e7d197a100">SHOW TABLE STATUS</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p143504417124">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r950a72b00df248f49a4f79651d54be0e"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_aa270d874a6f840c6ab478d3026a58909">SHOW TABLE PROPERTIES</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p53501441124">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_rdd41d9eb323048838ffdaefb7638f81f"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_af461528467e24b699770ab15769a0436">SELECT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p23508411212">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_ra76b7b690cf0437ab76d653dfb6fd670"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_afded35d032c34197a94b65f2a6643c08">EXPLAIN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p18350134151212">Select</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r52b3aabd3aea4758b10543181d98ed8e"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_ad970e9e0f9de4f27b227c6e4b952b718">CREATE VIEW</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p19350448129">Select, Grant Of Select, and Create</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_rc16b3cee44e54afb8f1940eb38cd929a"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_aa8ac6c495f6441f490d3dd5f4e61e0e7">CREATE TABLE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p143505414121">Create</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r557ced26755e42b191e09859934fb83d"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a014a55eaf5ea402db4bf41836d34a40a">ALTER TABLE ADD PARTITION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p83508415123">Insert</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r9a1ccf25472144bbaec66d639e686127"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_acef598c44a384596a08d79268e16b58e">INSERT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p83501041128">Insert</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r70294250946e4654845a50e5b39980b7"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_af05b04953cc64b559d1200b0d2d8a880">INSERT OVERWRITE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p1635113471212">Insert and Delete</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r76721df0fedc4f0fa79a6248d6647d43"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a0d7147938b8a40268e0affacba65fda7">ALTER TABLE DROP PARTITION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p1735112413123">The table-level Alter and Delete, and column-level Select permissions need to be granted.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_2352__en-us_topic_0000001173789716_r92becea616474e19a815ace66351234c"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_2352__en-us_topic_0000001173789716_a1ed39a49117d41c983e5ad3c2e038bb8">ALTER DATABASE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_2352__en-us_topic_0000001173789716_p343432421816">Hive Admin Privilege</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1724.html">HetuEngine MetaStore-based Permission Control</a></div>
|
|
</div>
|
|
</div>
|
|
|