Skip to main content
delete(*, table_name=None, expression=None)[source]

Deletes the record matching the provided criterion from the given table. The record selection criteria can be a single input parameter expression (matching multiple records) The operation is synchronous meaning that a response will not be available until the request is completely processed and all the matching records are deleted.

Parameters

table_name (str) –

Name of the table from which to delete records, in [schema_name.]table_name format, using standard name resolution rules. Must contain the name of an existing table; not applicable to views.

expression (str) –

The actual predicate, to be used by the delete operation; format should follow the guidelines provided here. Specifying an input parameter expression is mutually exclusive to specifying record_id in the input parameter options. The user can provide a single element (which will be automatically promoted to a list internally) or a list having a single element.

Returns

A dict with the following entries if successful–

count_deleted (long) –

Total number of records deleted across all expressions.

In case of error it returns a dict - ‘status’ –

‘ERROR’, ‘message’: ‘Some error message’