> ## 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.

# appendRecords

<div className="kinetica-doxygen">
  <div id="ac902ab53fb7c2f952e232315b7cb6536" />

  <h2 className="memtitle"><span className="permalink"><a href="#ac902ab53fb7c2f952e232315b7cb6536">◆ </a></span>appendRecords() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> gpudb::GPUdb::appendRecords </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest">AppendRecordsRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Append (or insert) all records from a source table (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a007088ffb6142dd12803205edb8772ff">sourceTableName</a>) to a particular target table (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a1f38b6189aefb233a3a6820263f063ac">tableName</a>). </p>
      <p>The field map (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a2cf9a4beaa61e288eaf21061283eeb2c">fieldMap</a>) holds the user specified map of target table column names with their mapped source column names.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a20ee0685b5f6505eb483d369c8649f9b" />

  <h2 className="memtitle"><span className="permalink"><a href="#a20ee0685b5f6505eb483d369c8649f9b">◆ </a></span>appendRecords() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> & gpudb::GPUdb::appendRecords </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest">AppendRecordsRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Append (or insert) all records from a source table (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a007088ffb6142dd12803205edb8772ff">sourceTableName</a>) to a particular target table (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a1f38b6189aefb233a3a6820263f063ac">tableName</a>). </p>
      <p>The field map (specified by <a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest#a2cf9a4beaa61e288eaf21061283eeb2c">fieldMap</a>) holds the user specified map of target table column names with their mapped source column names.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="ad2068df53aa2615c45e9bb2586387a27" />

  <h2 className="memtitle"><span className="permalink"><a href="#ad2068df53aa2615c45e9bb2586387a27">◆ </a></span>appendRecords() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> gpudb::GPUdb::appendRecords </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sourceTableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">fieldMap</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Append (or insert) all records from a source table (specified by <span className="em arg">sourceTableName</span>) to a particular target table (specified by <span className="em arg">tableName</span>). </p>
      <p>The field map (specified by <span className="em arg">fieldMap</span>) holds the user specified map of target table column names with their mapped source column names.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>The table name for the records to be appended, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">sourceTableName</td>
              <td>The source table name to get records from, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table name. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">fieldMap</td>
              <td>Contains the mapping of column names from the target table (specified by <span className="em arg">tableName</span>) as the keys, and corresponding column names or expressions (e.g., 'col\_name+1') from the source table (specified by <span className="em arg">sourceTableName</span>). Must be existing column names in source table and target table, and their types must be matched. For details on using expressions, see <a href="/content/concepts/expressions/" target="_top">Expressions</a>. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac7a5feee95ce26edc3b564a1fffee08d">append\_records\_offset</a>: A positive integer indicating the number of initial results to skip from <span className="em arg">sourceTableName</span>. Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. The default value is '0'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#afe4f2882fd7e45971a280abe883ea6ac">append\_records\_limit</a>: A positive integer indicating the maximum number of results to be returned from <span className="em arg">sourceTableName</span>. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. The default value is '-9999'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2f1dbdc4c899b222e30af6b5556a052e">append\_records\_expression</a>: Filter expression to apply to the <span className="em arg">sourceTableName</span>. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a07602ab890c84b3862164232fe78d6ec">append\_records\_order\_by</a>: Comma-separated list of the columns to be sorted by from source table (specified by <span className="em arg">sourceTableName</span>), e.g., 'timestamp asc, x desc'. The <a className="el" href="/content/api/cpp/namespacegpudb#a07602ab890c84b3862164232fe78d6ec">order\_by</a> columns do not have to be present in <span className="em arg">fieldMap</span>. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a6846d34da4d90dbaf91c3fadbe480e68">append\_records\_error\_handling</a>: Specifies how record errors are handled while appending source table records into the target table. Currently this governs primary-key collision behavior: <a className="el" href="/content/api/cpp/namespacegpudb#a30355488a5940174966e9f91e6b6c2d6">skip</a> and <a className="el" href="/content/api/cpp/namespacegpudb#a13aaa87c4c4c2d34d895111ba44938f0">permissive</a> drop the colliding source records and continue, while <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">abort</a> rejects the batch. Explicit <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> or <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">ignore\_existing\_pk</a> take precedence over this option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a13aaa87c4c4c2d34d895111ba44938f0">append\_records\_permissive</a>: Source records that cannot be appended (e.g. a primary-key collision) are skipped and reported; the rest of the batch is appended. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a30355488a5940174966e9f91e6b6c2d6">append\_records\_skip</a>: Source records that cannot be appended are skipped and reported; the rest of the batch is appended. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">append\_records\_abort</a>: A source record that cannot be appended (e.g. a primary-key collision) raises an error. This is the default. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">append\_records\_abort</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">append\_records\_update\_on\_existing\_pk</a>: Specifies the record collision policy for inserting source table records (specified by <span className="em arg">sourceTableName</span>) into a target table (specified by <span className="em arg">tableName</span>) with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, any existing table record with primary key values that match those of a source table record being inserted will be replaced by that new record (the new data will be "upserted"). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, any existing table record with primary key values that match those of a source table record being inserted will remain unchanged, while the source record will be rejected and an error handled as determined by <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">ignore\_existing\_pk</a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>: Upsert new records when primary keys match existing records. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>: Reject new records when primary keys match existing records. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a05126a08aa3e2a694e354112d3cd4a5d">append\_records\_enable\_inplace\_updates</a>: Applies only when upserting (when <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, an existing record matched by primary key is modified in place. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, it is updated by deleting the existing record and inserting a replacement (delete and insert), which prevents the change from being reflected in dependent materialized views until they are refreshed. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">append\_records\_ignore\_existing\_pk</a>: Specifies the record collision error-suppression policy for inserting source table records (specified by <span className="em arg">sourceTableName</span>) into a target table (specified by <span className="em arg">tableName</span>) with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, only used when not in upsert mode (upsert mode is disabled when <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, any source table record being inserted that is rejected for having primary key values that match those of an existing target table record will be ignored with no error generated. If <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, the rejection of any source table record for having primary key values matching an existing target table record will result in an error being raised. If the specified table does not have a primary key or if upsert mode is in effect (<a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>), then this option has no effect. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>: Ignore source table records whose primary key values collide with those of target table records. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>: Raise an error for any source table record whose primary key values collide with those of a target table record. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a728940d01e8466552445f439d78d098a">append\_records\_pk\_conflict\_predicate\_higher</a>: The record with higher value for the column resolves the primary-key insert conflict. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2783d0cf15d9c702b25d4c7f2571f4aa">append\_records\_pk\_conflict\_predicate\_lower</a>: The record with lower value for the column resolves the primary-key insert conflict. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a4403e70c31ca39faafe51ea1e9a78c95">append\_records\_truncate\_strings</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, it allows inserting longer strings into smaller charN string columns by truncating the longer strings to fit. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="acebe4ac75a8f120e5de64daa9535b25e" />

  <h2 className="memtitle"><span className="permalink"><a href="#acebe4ac75a8f120e5de64daa9535b25e">◆ </a></span>appendRecords() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> & gpudb::GPUdb::appendRecords </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">sourceTableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">fieldMap</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">AppendRecordsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Append (or insert) all records from a source table (specified by <span className="em arg">sourceTableName</span>) to a particular target table (specified by <span className="em arg">tableName</span>). </p>
      <p>The field map (specified by <span className="em arg">fieldMap</span>) holds the user specified map of target table column names with their mapped source column names.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>The table name for the records to be appended, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">sourceTableName</td>
              <td>The source table name to get records from, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table name. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">fieldMap</td>
              <td>Contains the mapping of column names from the target table (specified by <span className="em arg">tableName</span>) as the keys, and corresponding column names or expressions (e.g., 'col\_name+1') from the source table (specified by <span className="em arg">sourceTableName</span>). Must be existing column names in source table and target table, and their types must be matched. For details on using expressions, see <a href="/content/concepts/expressions/" target="_top">Expressions</a>. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac7a5feee95ce26edc3b564a1fffee08d">append\_records\_offset</a>: A positive integer indicating the number of initial results to skip from <span className="em arg">sourceTableName</span>. Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. The default value is '0'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#afe4f2882fd7e45971a280abe883ea6ac">append\_records\_limit</a>: A positive integer indicating the maximum number of results to be returned from <span className="em arg">sourceTableName</span>. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. The default value is '-9999'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2f1dbdc4c899b222e30af6b5556a052e">append\_records\_expression</a>: Filter expression to apply to the <span className="em arg">sourceTableName</span>. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a07602ab890c84b3862164232fe78d6ec">append\_records\_order\_by</a>: Comma-separated list of the columns to be sorted by from source table (specified by <span className="em arg">sourceTableName</span>), e.g., 'timestamp asc, x desc'. The <a className="el" href="/content/api/cpp/namespacegpudb#a07602ab890c84b3862164232fe78d6ec">order\_by</a> columns do not have to be present in <span className="em arg">fieldMap</span>. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a6846d34da4d90dbaf91c3fadbe480e68">append\_records\_error\_handling</a>: Specifies how record errors are handled while appending source table records into the target table. Currently this governs primary-key collision behavior: <a className="el" href="/content/api/cpp/namespacegpudb#a30355488a5940174966e9f91e6b6c2d6">skip</a> and <a className="el" href="/content/api/cpp/namespacegpudb#a13aaa87c4c4c2d34d895111ba44938f0">permissive</a> drop the colliding source records and continue, while <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">abort</a> rejects the batch. Explicit <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> or <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">ignore\_existing\_pk</a> take precedence over this option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a13aaa87c4c4c2d34d895111ba44938f0">append\_records\_permissive</a>: Source records that cannot be appended (e.g. a primary-key collision) are skipped and reported; the rest of the batch is appended. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a30355488a5940174966e9f91e6b6c2d6">append\_records\_skip</a>: Source records that cannot be appended are skipped and reported; the rest of the batch is appended. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">append\_records\_abort</a>: A source record that cannot be appended (e.g. a primary-key collision) raises an error. This is the default. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab3a13dce9bd21fff14a7cb408362cfc6">append\_records\_abort</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">append\_records\_update\_on\_existing\_pk</a>: Specifies the record collision policy for inserting source table records (specified by <span className="em arg">sourceTableName</span>) into a target table (specified by <span className="em arg">tableName</span>) with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, any existing table record with primary key values that match those of a source table record being inserted will be replaced by that new record (the new data will be "upserted"). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, any existing table record with primary key values that match those of a source table record being inserted will remain unchanged, while the source record will be rejected and an error handled as determined by <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">ignore\_existing\_pk</a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>: Upsert new records when primary keys match existing records. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>: Reject new records when primary keys match existing records. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a05126a08aa3e2a694e354112d3cd4a5d">append\_records\_enable\_inplace\_updates</a>: Applies only when upserting (when <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, an existing record matched by primary key is modified in place. If set to <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, it is updated by deleting the existing record and inserting a replacement (delete and insert), which prevents the change from being reflected in dependent materialized views until they are refreshed. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a9316eeb63a5e01730174d5b39e4cdc07">append\_records\_ignore\_existing\_pk</a>: Specifies the record collision error-suppression policy for inserting source table records (specified by <span className="em arg">sourceTableName</span>) into a target table (specified by <span className="em arg">tableName</span>) with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>, only used when not in upsert mode (upsert mode is disabled when <a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>). If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, any source table record being inserted that is rejected for having primary key values that match those of an existing target table record will be ignored with no error generated. If <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">false</a>, the rejection of any source table record for having primary key values matching an existing target table record will result in an error being raised. If the specified table does not have a primary key or if upsert mode is in effect (<a className="el" href="/content/api/cpp/namespacegpudb#a20a1fe73ce67985b994e3f7e2b0fe62b">update\_on\_existing\_pk</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>), then this option has no effect. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a>: Ignore source table records whose primary key values collide with those of target table records. </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>: Raise an error for any source table record whose primary key values collide with those of a target table record. </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a728940d01e8466552445f439d78d098a">append\_records\_pk\_conflict\_predicate\_higher</a>: The record with higher value for the column resolves the primary-key insert conflict. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2783d0cf15d9c702b25d4c7f2571f4aa">append\_records\_pk\_conflict\_predicate\_lower</a>: The record with lower value for the column resolves the primary-key insert conflict. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a4403e70c31ca39faafe51ea1e9a78c95">append\_records\_truncate\_strings</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">true</a>, it allows inserting longer strings into smaller charN string columns by truncating the longer strings to fit. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4dc510a6c94513c747849fccae2921f1">append\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a2a6ce357b6b7f28848b9cb643c21ddc9">append\_records\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1AppendRecordsResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
