Data Access
Also available as:
loading table of contents...

Creating Hive ACID Transaction Tables

About this Task

Using Hive View 2.0 of Ambari, you can enable ACID-based transactions so that you can create tables that support transactional SQL. Hive View 2.0 also lets you export the DDL of the table to fully functional scripts.


  1. In Ambari, select Services > Hive > Configs.

  2. On the Settings subtab, set the ACID Transactions slider to On:

  3. Click Save.

  4. Enter an annotation about the change.

  5. If the Dependent Configurations window appears, review the recommended changes. You can modify the settings if you need to do so for your cluster environment.

  6. Open Hive View 2.0. One way that you can do this is by clicking the palette icon in the upper right corner of the Ambari window, as shown in the following screenshot.

  7. Select +NEW TABLE button > COLUMNS subtab.

  8. Define the column name and data type for each column of your table. Click the ADVANCED configuration wheel for the column to be the key column.

  9. After clicking the ADVANCED configuration wheel for the column to be set as the key column, designate the clustering key by clicking the Clustered checkbox.

  10. Click the ADVANCED subtab. Click the Transactional checkbox and enter your value for the Number of buckets field.

  11. Click the +Create button toward the bottom of the Ambari window.

  12. (Optional) Click the DDL subtab to view the SQL of the table so that you can copy it, use it as a template for other tables, and export it as a script. This can help with understanding and possibly reusing the DDL in a production environment where you do not want to use a GUI tool, such as in a Beeline CLI.