Using Apache HiveQL
Also available as:
PDF

Create a CRUD transactional table

You create a CRUD transactional table when you need a managed table that you can update, delete, and merge.

In this task, you create a CRUD transactional table on the command line. You cannot sort this type of table. Bucketing is optional in Hive 3 and does not affect performance. By default, table data is stored in the Optimized Row Columnar (ORC) file format. Implementing a storage handler that supports AcidInputFormat and AcidOutputFormat is equivalent to specifying ORC storage.

  1. Launch Beeline to start Hive.
    For example:
    beeline -u jdbc:hive2://myhiveserver.com:10000 -n hive -p
  2. Enter your user name and password.
    The Hive 3 connection message, followed by the Hive prompt for entering HiveQL queries on the command line, appears.
  3. Create a CRUD transactional table named T having two integer columns, a and b:
    CREATE TABLE T(a int, b int);