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

# exportRecordsToTable

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

  <h2 className="memtitle"><span className="permalink"><a href="#a63a3d3e6b0df86ad1a7cab47c9223904">◆ </a></span>exportRecordsToTable() <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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> gpudb::GPUdb::exportRecordsToTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExportRecordsToTableRequest">ExportRecordsToTableRequest</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>Exports records from source table to the specified target table in an external database. </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_1ExportRecordsToTableRequest">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_1ExportRecordsToTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a19cc9e60db0a4e1464ab705dd22f7c4a" />

  <h2 className="memtitle"><span className="permalink"><a href="#a19cc9e60db0a4e1464ab705dd22f7c4a">◆ </a></span>exportRecordsToTable() <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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> & gpudb::GPUdb::exportRecordsToTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExportRecordsToTableRequest">ExportRecordsToTableRequest</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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Exports records from source table to the specified target table in an external database. </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_1ExportRecordsToTableRequest">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_1ExportRecordsToTableResponse">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_1ExportRecordsToTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a6e8f99e3e18f0dc268bd05fab42177b4" />

  <h2 className="memtitle"><span className="permalink"><a href="#a6e8f99e3e18f0dc268bd05fab42177b4">◆ </a></span>exportRecordsToTable() <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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> gpudb::GPUdb::exportRecordsToTable </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">remoteQuery</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>Exports records from source table to the specified target table in an external database. </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>Name of the table from which the data will be exported to remote database, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">remoteQuery</td>
              <td>Parameterized insert query to export gpudb table data into remote database. The default value is ''. </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#a85d205ffa986c9b4939c8cecccdefff9">export\_records\_to\_table\_batch\_size</a>: Batch size, which determines how many rows to export per round trip. The default value is '200000'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa89ddb9c3c00aef1fc8e62bca0abcc76">export\_records\_to\_table\_datasink\_name</a>: Name of an existing external data sink to which table name specified in <span className="em arg">tableName</span> will be exported. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab0e8c4fce245b0147639fdd00d70705a">export\_records\_to\_table\_jdbc\_session\_init\_statement</a>: Executes the statement per each JDBC session before doing actual load. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1328bcfcd1e57695d54d30b64a08bd77">export\_records\_to\_table\_jdbc\_connection\_init\_statement</a>: Executes the statement once before doing actual load. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#adf44285a6525ba4dfe899eb422c124f3">export\_records\_to\_table\_remote\_table</a>: Name of the target table to which source table is exported. When this option is specified remote\_query cannot be specified. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#aa370c090a9d6859b66aa280d1bdbe448">export\_records\_to\_table\_use\_st\_geomfrom\_casts</a>: Wraps parameterized variables with st\_geomfromtext or st\_geomfromwkb based on source column type. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2731835102f68fdecea5fc67c6ccb1db">export\_records\_to\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#ab9b4df6482422f94af6f70ed35943100">export\_records\_to\_table\_use\_indexed\_parameters</a>: Uses \$n style syntax when generating insert query for remote\_table option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2731835102f68fdecea5fc67c6ccb1db">export\_records\_to\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_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_1ExportRecordsToTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="ae4b6afe4a9a67fa6eeba83b2f596afe4" />

  <h2 className="memtitle"><span className="permalink"><a href="#ae4b6afe4a9a67fa6eeba83b2f596afe4">◆ </a></span>exportRecordsToTable() <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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> & gpudb::GPUdb::exportRecordsToTable </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">remoteQuery</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_1ExportRecordsToTableResponse">ExportRecordsToTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Exports records from source table to the specified target table in an external database. </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>Name of the table from which the data will be exported to remote database, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">remoteQuery</td>
              <td>Parameterized insert query to export gpudb table data into remote database. The default value is ''. </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#a85d205ffa986c9b4939c8cecccdefff9">export\_records\_to\_table\_batch\_size</a>: Batch size, which determines how many rows to export per round trip. The default value is '200000'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa89ddb9c3c00aef1fc8e62bca0abcc76">export\_records\_to\_table\_datasink\_name</a>: Name of an existing external data sink to which table name specified in <span className="em arg">tableName</span> will be exported. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab0e8c4fce245b0147639fdd00d70705a">export\_records\_to\_table\_jdbc\_session\_init\_statement</a>: Executes the statement per each JDBC session before doing actual load. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1328bcfcd1e57695d54d30b64a08bd77">export\_records\_to\_table\_jdbc\_connection\_init\_statement</a>: Executes the statement once before doing actual load. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#adf44285a6525ba4dfe899eb422c124f3">export\_records\_to\_table\_remote\_table</a>: Name of the target table to which source table is exported. When this option is specified remote\_query cannot be specified. The default value is ''. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#aa370c090a9d6859b66aa280d1bdbe448">export\_records\_to\_table\_use\_st\_geomfrom\_casts</a>: Wraps parameterized variables with st\_geomfromtext or st\_geomfromwkb based on source column type. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2731835102f68fdecea5fc67c6ccb1db">export\_records\_to\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#ab9b4df6482422f94af6f70ed35943100">export\_records\_to\_table\_use\_indexed\_parameters</a>: Uses \$n style syntax when generating insert query for remote\_table option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2731835102f68fdecea5fc67c6ccb1db">export\_records\_to\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a9e45af6d64023a232bdb904e6b7f5aca">export\_records\_to\_table\_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_1ExportRecordsToTableResponse">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_1ExportRecordsToTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
