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

### insert\_records\_from\_query

<ul>
  <li>
    insert\_records\_from\_query(\
    &#x20;table\_name: string,\
    &#x20;remote\_query: 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/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[InsertRecordsFromQueryResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsFromQueryResponse.md)>

    Computes remote query result and inserts the result data into a new or existing table.

    #### 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 remote query, and the new table name will have to meet standard table naming criteria.
      </li>

      <li>
        remote\_query: string

        Query for which result data needs to be imported.
      </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.
      </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\<[InsertRecordsFromQueryResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsFromQueryResponse.md)>

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

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

### insert\_records\_from\_query\_request

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

    Computes remote query result and inserts the result data into a new or existing table.

    #### Parameters

    <ul>
      <li>
        request: [InsertRecordsFromQueryRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsFromQueryRequest.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\<[InsertRecordsFromQueryResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/InsertRecordsFromQueryResponse.md)>

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

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


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