FireDAC Components for Apache Hive

Build 21.0.7930

DELETE Statements

To delete from a table, use DELETE statements.

DELETE Syntax

The DELETE statement requires the table name in the FROM clause and the row's primary key in the WHERE clause.

<delete_statement> ::= DELETE FROM <table_name> WHERE { _id = <expression> } [ { AND | OR } ... ]

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

Example Query:

DELETE FROM [CData].[Default].Customers WHERE _id = @my_id

NOTE: DELETE is available starting in Hive 0.14. Deletes can only be performed on tables that support ACID. Please refer to the Hive Transactions documentation for further information: https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions

If one of the below errors are encountered, this refers to the table not supporting ACID and must be configured in order to perform DELETE operations. Please 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