Viewing Table Structures Using the show create Statement as Users with the select Permission
Scenario
This function is applicable to Hive and Spark2x in MRS 3.x and later.
With this function enabled, if the select permission is granted to a user during Hive table creation, the user can run the show create table command to view the table structure.
Procedure
- The Hive service configuration page is displayed.
- For versions earlier than MRS 3.x, click the cluster name. On the cluster details page that is displayed, choose Components > Hive > Service Configuration, and select All from the Basic drop-down list.
If the Components tab is not displayed on the cluster page, synchronize IAM users. (In the Dashboard area of the cluster details page, click Click to synchronize on the right of IAM User Sync to synchronize IAM users.)
- For MRS 3.x or later, log in to FusionInsight Manager. For details, see Accessing FusionInsight Manager (MRS 3.x or Later). And choose Cluster > Name of the desired cluster > Services > Hive > Configurations > All Configurations.
- For versions earlier than MRS 3.x, click the cluster name. On the cluster details page that is displayed, choose Components > Hive > Service Configuration, and select All from the Basic drop-down list.
- Choose HiveServer(Role) > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.allow.show.create.table.in.select.nogrant, and set Value to true. Restart all Hive instances after the modification.
- Determine whether to enable this function on the Spark/Spark2x client.
- If yes, download and install the Spark/Spark2x client again.
- If no, no further action is required.
Last Article: Enhancing beeline Reliability
Next Article: Writing a Directory into Hive with the Old Data Removed to the Recycle Bin
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.