update_#

swordfish.function.update_()#

Update columns of a table in place. If a column in colNames doesn’t exist, create a new column; otherwise update the existing column. If a filter is specified, only rows satisfying the filtering condition will be updated.

This operation is parallel if the table is a partitioned table and if the parallel processing feature is enabled (when the configuration parameter localExcutors > 0).

Parameters:
  • table (Constant) – A DolphinDB table. It can be a partitioned in-memory table.

  • colNames (Constant) – A string scalar/vector indicating the columns to be updated.

  • newValues (Constant) – A piece of metacode with the operations for the specified columns. Metacode is objects or expressions within “<” and “>”. For details about metacode, please refer to Metaprogramming.

  • filter (Constant, optional) – A a piece of metacode with filterting conditions, by default DFLT.