FireDAC Components for Apache Hive

Build 21.0.7930

UPDATE Statements

To modify existing records, use UPDATE statements.

Update Syntax

The UPDATE statement takes as input a comma-separated list of columns and new column values as name-value pairs in the SET clause, as shown in the following example:

UPDATE <table_name> SET { <column_reference> = <expression> } [ , ... ] WHERE { _id = <expression>  } [ { AND | OR } ... ] 

<expression> ::=
  | @ <parameter> 
  | ?
  | <literal>

Example Query:

UPDATE [CData].[Default].Customers SET CompanyName='RSSBus Inc.' WHERE _id = @my_id

Note: UPDATE is available starting in Hive 0.14. Updates can only be performed on tables that support ACID. Refer to the Hive Transactions documentation for further information: https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions

If one of the following errors occurs, this refers to the table not supporting ACID and must be configured in order to perform UPDATE operations. Refer to the Hive Transactions documentation for further information about how to properly configure your Hive table.

  • This command is not allowed on an acid table with a non-acid transaction manager. This error occurs when the 'hive.txn.manager' parameter is not set to 'org.apache.hadoop.hive.ql.lockmgr.DbTxnManager'.
  • [table] does not use an AcidOutputFormat or is not bucketed. This error occurs when your table is not bucketed or if it is not stored using a supported storage format (ORC file format).

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930