Using Apache Hive
Also available as:
PDF

Create a CRUD transactional table

You create a CRUD transactional table having ACID (atomic, consistent, isolated, and durable) properties when you need a managed table that you can update, delete, and merge. Table data is stored in the Optimized Row Columnar (ORC) file format by default.

In this task, you create a CRUD transactional table. You cannot sort this type of table. To create a CRUD transactional table, you must accept the default ORC format by not specifying any storage during table creation, or by specifying ORC storage explicitly.

  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 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);
  4. Confirm that you created a managed, ACID table.
    DESCRIBE FORMATTED T;
    The table type says MANAGED_TABLE and transactional = true.