jdbc_delete constructs and executes an SQL DELETE statement for each record in the input record stream. The field names specified in whereFields array and their respective values in the record will be used to construct WHERE clause.

jdbc_delete(uri:uri_str, table:table_name_str, wherefields:fname_array)
jdbc_delete(uri:uri_str, table:table_name_str, wherefields:fname_array,
            username:uname_str, password:pswd_str)
  • uri_str - is Jdbc connection string. The format of the string depends on the particular Jdbc driver of the database.
  • table_name_str - name of the table. JDBC_TABLE constructs SQL query retrieving all rows in the table. When omitted then SQL query is constructed retrieving the list of all tables in all schemas.
  • fname_array - names of fields used for constructing WHERE clause. Expressed as an array of strings.
  • uname_str - username of database user. Optional.
  • pswd_str - password of database user. Optional.


Respective Jdbc drivers must be enabled in configuration.

On successful execution jdbc_delete outputs following:

  • uri - Jdbc connection uri to the database
  • table - affected table
  • rows - number of rows affected by operation
  • field_count - input field count

Example Store 10 generated records in an sqlite database table test using jdbc_insert command:

| select(t as time, ip, s as description)
| jdbc_delete(uri:'jdbc:sqlite:file:/tmp/test.db'
              ,table:'test'         // delete from table 'test'
              ,['ip']               // input stream field 'ip' values are used in where clause


In order for this example to work: * SQLite JDBC driver must be enabled in SpectX configuration and * an SQLite database must exist in the path specified by JDBC connection string