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

# insert_records

### insert\_records

<ul>
  <li>
    insert\_records(\
    &#x20;table\_name: string,\
    &#x20;data: Record\<string, any>\[],\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[InsertRecordsResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsResponse.md)>

    Adds multiple records to the specified table. The operation is synchronous, meaning that a response will not be returned until all the records are fully inserted and available. The response payload provides the counts of the number of records actually inserted and/or updated, and can provide the unique identifier of each added record.The `options` parameter can be used to customize this function's behavior.The update\_on\_existing\_pk option specifies the record collision policy for inserting into a table with a primary key, but is ignored if no primary key exists.The return\_record\_ids option indicates that the database should return the unique identifiers of inserted records.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of table to which the records are to be added, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table.
      </li>

      <li>
        data: Record\<string, any>\[]

        Data records to process
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[InsertRecordsResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsResponse.md)>

    Promise\<Types.InsertRecordsResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:11603](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L11603)</li>
    </ul>
  </li>
</ul>

### insert\_records\_request

<ul>
  <li>
    insert\_records\_request(\
    &#x20;request: [InsertRecordsRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[InsertRecordsResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsResponse.md)>

    Adds multiple records to the specified table. The operation is synchronous, meaning that a response will not be returned until all the records are fully inserted and available. The response payload provides the counts of the number of records actually inserted and/or updated, and can provide the unique identifier of each added record.The `options` parameter can be used to customize this function's behavior.The update\_on\_existing\_pk option specifies the record collision policy for inserting into a table with a primary key, but is ignored if no primary key exists.The return\_record\_ids option indicates that the database should return the unique identifiers of inserted records.

    #### Parameters

    <ul>
      <li>
        request: [InsertRecordsRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[InsertRecordsResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsResponse.md)>

    Promise\<Types.InsertRecordsResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:11562](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L11562)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.