> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# updateRecordsRaw

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="updateRecordsRaw(com.gpudb.protocol.RawUpdateRecordsRequest)">
        <h3>updateRecordsRaw</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/UpdateRecordsResponse" title="class in com.gpudb.protocol">UpdateRecordsResponse</a></span> <span className="element-name">updateRecordsRaw</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest" title="class in com.gpudb.protocol">RawUpdateRecordsRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

        <div className="block">
          Runs multiple predicate-based updates in a single call. With the list of given expressions, any matching record's column values will be updated as provided in <a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest#getNewValuesMaps()"><code>newValuesMaps</code></a>. There is also an optional 'upsert' capability where if a particular predicate doesn't match any existing record, then a new record can be inserted.
          <p> Note that this operation can only be run on an original table and not on a result view. </p>
          <p> This operation can update primary key values. By default only 'pure primary key' predicates are allowed when updating primary key values. If the primary key for a table is the column 'attr1', then the operation will only accept predicates of the form: "attr1 == 'foo'" if the attr1 column is being updated. For a composite primary key (e.g. columns 'attr1' and 'attr2') then this operation will only accept predicates of the form: "(attr1 == 'foo') and (attr2 == 'bar')". Meaning, all primary key columns must appear in an equality predicate in the expressions. Furthermore each 'pure primary key' predicate must be unique within a given request. These restrictions can be removed by utilizing some available options through <a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest#getOptions()"><code>options</code></a>. </p>
          <p> The <a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest.Options#UPDATE_ON_EXISTING_PK"><code>UPDATE\_ON\_EXISTING\_PK</code></a> option specifies the record primary key collision policy for tables with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, while <a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest.Options#IGNORE_EXISTING_PK"><code>IGNORE\_EXISTING\_PK</code></a> specifies the record primary key collision error-suppression policy when those collisions result in the update being rejected. Both are ignored on tables with no primary key.</p>
        </div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/RawUpdateRecordsRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/UpdateRecordsResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
