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

### insert\_records\_from\_payload

<ul>
  <li>
    insert\_records\_from\_payload(\
    &#x20;table\_name: string,\
    &#x20;data\_text: string,\
    &#x20;data\_bytes: string,\
    &#x20;modify\_columns?: Record\<string, Record\<string, string>>,\
    &#x20;create\_table\_options?: Record\<string, string>,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[InsertRecordsFromPayloadResponse](https://docs.kinetica.com/content/api/javascript/interfaces/InsertRecordsFromPayloadResponse.md)>

    Reads from the given text-based or binary payload and inserts the data into a new or existing table. The table will be created if it doesn't already exist.Returns once all records are processed.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of the table into which the data will be inserted, in \[schema\_name.]table\_name format, using standard name resolution rules. If the table does not exist, the table will be created using either an existing type\_id or the type inferred from the payload, and the new table name will have to meet standard table naming criteria.
      </li>

      <li>
        data\_text: string

        Records formatted as delimited text.
      </li>

      <li>
        data\_bytes: string

        Records formatted as binary data.
      </li>

      <li>
        `Optional`modify\_columns: Record\<string, Record\<string, string>>

        Not implemented yet.
      </li>

      <li>
        `Optional`create\_table\_options: Record\<string, string>

        Options used when creating the target table. Includes type to use. The other options match those in `create_table`.
      </li>

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

        Optional parameters.
      </li>

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

        Optional callback function
      </li>
    </ul>

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

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

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

### insert\_records\_from\_payload\_request

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

    Reads from the given text-based or binary payload and inserts the data into a new or existing table. The table will be created if it doesn't already exist.Returns once all records are processed.

    #### Parameters

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

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

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

        Optional callback function
      </li>
    </ul>

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

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

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


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