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

# insertRecordsFromQuery

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="insertRecordsFromQuery(com.gpudb.protocol.InsertRecordsFromQueryRequest)">
        <h3>insertRecordsFromQuery</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryResponse" title="class in com.gpudb.protocol">InsertRecordsFromQueryResponse</a></span> <span className="element-name">insertRecordsFromQuery</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest" title="class in com.gpudb.protocol">InsertRecordsFromQueryRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Computes remote query result and inserts the result data into a new or existing table.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="insertRecordsFromQuery(java.lang.String,java.lang.String,java.util.Map,java.util.Map,java.util.Map)">
        <h3>insertRecordsFromQuery</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryResponse" title="class in com.gpudb.protocol">InsertRecordsFromQueryResponse</a></span> <span className="element-name">insertRecordsFromQuery</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> tableName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> remoteQuery, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>>> modifyColumns, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> createTableOptions, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Computes remote query result and inserts the result data into a new or existing table.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the table into which the data will be inserted, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. If the table does not exist, the table will be created using either an existing <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TYPE_ID"><code>TYPE\_ID</code></a> or the type inferred from the remote query, and the new table name will have to meet standard <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>.</div>
          <div className="dd"><code>remoteQuery</code> - Query for which result data needs to be imported.</div>
          <div className="dd"><code>modifyColumns</code> - Not implemented yet. The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.</div>

          <div className="dd">
            <code>createTableOptions</code> - Options used when creating the target table.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TYPE_ID"><code>TYPE\_ID</code></a>: ID of a currently registered <a href="/content/concepts/types/" target="_top">type</a>. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#NO_ERROR_IF_EXISTS"><code>NO\_ERROR\_IF\_EXISTS</code></a>: If <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a>, prevents an error from occurring if the table already exists and is of the given type. If a table with the same ID but a different type exists, it is still an error. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#IS_REPLICATED"><code>IS\_REPLICATED</code></a>: Affects the <a href="/content/concepts/tables/#distribution" target="_top">distribution scheme</a> for the table's data. If <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a> and the given type has no explicit <a href="/content/concepts/tables/#shard-key" target="_top">shard key</a> defined, the table will be <a href="/content/concepts/tables/#replication" target="_top">replicated</a>. If <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a>, the table will be <a href="/content/concepts/tables/#sharding" target="_top">sharded</a> according to the shard key specified in the given <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TYPE_ID"><code>TYPE\_ID</code></a>, or <a href="/content/concepts/tables/#random-sharding" target="_top">randomly sharded</a>, if no shard key is specified. Note that a type containing a shard key cannot be used to create a replicated table. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FOREIGN_KEYS"><code>FOREIGN\_KEYS</code></a>: Semicolon-separated list of <a href="/content/concepts/tables/#foreign-keys" target="_top">foreign keys</a>, of the format '(source\_column\_name \[, ...]) references target\_table\_name(primary\_key\_column\_name \[, ...]) \[as foreign\_key\_name]'. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FOREIGN_SHARD_KEY"><code>FOREIGN\_SHARD\_KEY</code></a>: Foreign shard key of the format 'source\_column references shard\_by\_column from target\_table(primary\_key\_column)'. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#PARTITION_TYPE"><code>PARTITION\_TYPE</code></a>: <a href="/content/concepts/tables/#partitioning" target="_top">Partitioning</a> scheme to use. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#RANGE"><code>RANGE</code></a>: Use <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#INTERVAL"><code>INTERVAL</code></a>: Use <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#LIST"><code>LIST</code></a>: Use <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#HASH"><code>HASH</code></a>: Use <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#SERIES"><code>SERIES</code></a>: Use <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a>. </li>
                </ul>
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#PARTITION_KEYS"><code>PARTITION\_KEYS</code></a>: Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#PARTITION_DEFINITIONS"><code>PARTITION\_DEFINITIONS</code></a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#PARTITION_DEFINITIONS"><code>PARTITION\_DEFINITIONS</code></a>: Comma-separated list of partition definitions, whose format depends on the choice of <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#PARTITION_TYPE"><code>PARTITION\_TYPE</code></a>. See <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>, or <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a> for example formats. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#IS_AUTOMATIC_PARTITION"><code>IS\_AUTOMATIC\_PARTITION</code></a>: If <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a>, a new partition will be created for values which don't fall into an existing partition. Currently only supported for <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitions</a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TTL"><code>TTL</code></a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the table specified in <code>tableName</code>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#CHUNK_SIZE"><code>CHUNK\_SIZE</code></a>: Indicates the number of records per chunk to be used for this table. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#IS_RESULT_TABLE"><code>IS\_RESULT\_TABLE</code></a>: Indicates whether the table is a <a href="/content/concepts/tables_memory_only/" target="_top">memory-only table</a>. A result table cannot contain columns with text\_search <a href="/content/concepts/types/#data-handling" target="_top">data-handling</a>, and it will not be retained if the server is restarted. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#STRATEGY_DEFINITION"><code>STRATEGY\_DEFINITION</code></a>: The <a href="/content/rm/concepts/#tier-strategies" target="_top">tier strategy</a> for the table and its columns. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.CreateTableOptions#COMPRESSION_CODEC"><code>COMPRESSION\_CODEC</code></a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for this table's columns. </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#BAD_RECORD_TABLE_NAME"><code>BAD\_RECORD\_TABLE\_NAME</code></a>: Name of a table to which records that were rejected are written. The bad-record-table has the following columns: line\_number (long), line\_rejected (string), error\_message (string). When error handling is Abort, bad records table is not populated. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#BAD_RECORD_TABLE_LIMIT"><code>BAD\_RECORD\_TABLE\_LIMIT</code></a>: A positive integer indicating the maximum number of records that can be written to the bad-record-table. Default value is 10000. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#BATCH_SIZE"><code>BATCH\_SIZE</code></a>: Number of records per batch when inserting data. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#DATASOURCE_NAME"><code>DATASOURCE\_NAME</code></a>: Name of an existing external data source from which table will be loaded. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ERROR_HANDLING"><code>ERROR\_HANDLING</code></a>: Specifies how errors should be handled upon insertion. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#PERMISSIVE"><code>PERMISSIVE</code></a>: Records with missing columns are populated with nulls if possible; otherwise, the malformed records are skipped. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#SKIP"><code>SKIP</code></a>: Malformed records are skipped. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#IGNORE_BAD_RECORDS"><code>IGNORE\_BAD\_RECORDS</code></a>: Deprecated. Alias for <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#SKIP"><code>SKIP</code></a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ABORT"><code>ABORT</code></a>: Stops current insertion and aborts entire operation when an error is encountered. Primary key collisions are considered abortable errors in this mode. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ABORT"><code>ABORT</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#PK_CONFLICT_PREDICATE_HIGHER"><code>PK\_CONFLICT\_PREDICATE\_HIGHER</code></a>: The record with higher value for the column resolves the primary-key insert conflict. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#PK_CONFLICT_PREDICATE_LOWER"><code>PK\_CONFLICT\_PREDICATE\_LOWER</code></a>: The record with lower value for the column resolves the primary-key insert conflict. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#IGNORE_EXISTING_PK"><code>IGNORE\_EXISTING\_PK</code></a>: Specifies the record collision error-suppression policy for inserting into a table 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 href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#UPDATE_ON_EXISTING_PK"><code>UPDATE\_ON\_EXISTING\_PK</code></a> is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>). If set to <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>, any record being inserted that is rejected for having primary key values that match those of an existing table record will be ignored with no error generated. If <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>, the rejection of any record for having primary key values matching an existing record will result in an error being reported, as determined by <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ERROR_HANDLING"><code>ERROR\_HANDLING</code></a>. If the specified table does not have a primary key or if upsert mode is in effect (<a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#UPDATE_ON_EXISTING_PK"><code>UPDATE\_ON\_EXISTING\_PK</code></a> is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>), then this option has no effect. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>: Ignore new records whose primary key values collide with those of existing records. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>: Treat as errors any new records whose primary key values collide with those of existing records. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#INGESTION_MODE"><code>INGESTION\_MODE</code></a>: Whether to do a full load, dry run, or perform a type inference on the source data. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FULL"><code>FULL</code></a>: Run a type inference on the source data (if needed) and ingest. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#DRY_RUN"><code>DRY\_RUN</code></a>: Does not load data, but walks through the source data and determines the number of valid records, taking into account the current mode of <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ERROR_HANDLING"><code>ERROR\_HANDLING</code></a>. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TYPE_INFERENCE_ONLY"><code>TYPE\_INFERENCE\_ONLY</code></a>: Infer the type of the source data and return, without ingesting any data. The inferred type is returned in the response. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FULL"><code>FULL</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#JDBC_FETCH_SIZE"><code>JDBC\_FETCH\_SIZE</code></a>: The JDBC fetch size, which determines how many rows to fetch per round trip. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#JDBC_SESSION_INIT_STATEMENT"><code>JDBC\_SESSION\_INIT\_STATEMENT</code></a>: Executes the statement per each JDBC session before doing actual load. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#NUM_SPLITS_PER_RANK"><code>NUM\_SPLITS\_PER\_RANK</code></a>: Number of splits for reading data per rank. Default will be external\_file\_reader\_num\_tasks. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#NUM_TASKS_PER_RANK"><code>NUM\_TASKS\_PER\_RANK</code></a>: Number of tasks for reading data per rank. Default will be external\_file\_reader\_num\_tasks. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#PRIMARY_KEYS"><code>PRIMARY\_KEYS</code></a>: Comma separated list of column names, to set as primary keys, when not specified in the type. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#SHARD_KEYS"><code>SHARD\_KEYS</code></a>: Comma separated list of column names, to set as shard keys, when not specified in the type. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#SUBSCRIBE"><code>SUBSCRIBE</code></a>: Continuously poll the data source to check for new data and load it into the table. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUNCATE_TABLE"><code>TRUNCATE\_TABLE</code></a>: If set to <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>, truncates the table specified by <code> tableName</code> prior to loading the data. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY"><code>REMOTE\_QUERY</code></a>: Remote SQL query from which data will be sourced. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY_ORDER_BY"><code>REMOTE\_QUERY\_ORDER\_BY</code></a>: Name of column to be used for splitting the query into multiple sub-queries using ordering of given column. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY_FILTER_COLUMN"><code>REMOTE\_QUERY\_FILTER\_COLUMN</code></a>: Name of column to be used for splitting the query into multiple sub-queries using the data distribution of given column. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY_INCREASING_COLUMN"><code>REMOTE\_QUERY\_INCREASING\_COLUMN</code></a>: Column on subscribed remote query result that will increase for new records (e.g., TIMESTAMP). The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY_PARTITION_COLUMN"><code>REMOTE\_QUERY\_PARTITION\_COLUMN</code></a>: Alias name for <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#REMOTE_QUERY_FILTER_COLUMN"><code>REMOTE\_QUERY\_FILTER\_COLUMN</code></a>. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUNCATE_STRINGS"><code>TRUNCATE\_STRINGS</code></a>: If set to <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>, truncate string values that are longer than the column's type size. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ENABLE_INPLACE_UPDATES"><code>ENABLE\_INPLACE\_UPDATES</code></a>: Applies only when upserting (when update\_on\_existing\_pk is true). If set to true (the default), an existing record matched by primary key is modified in place. If set to false, the matched record is updated by deleting it 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 href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#UPDATE_ON_EXISTING_PK"><code>UPDATE\_ON\_EXISTING\_PK</code></a>: Specifies the record collision policy for inserting into a table with a <a href="/content/concepts/tables/#primary-keys" target="_top">primary key</a>. If set to <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>, any existing table record with primary key values that match those of a record being inserted will be replaced by that new record (the new data will be "upserted"). If set to <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>, any existing table record with primary key values that match those of a record being inserted will remain unchanged, while the new record will be rejected and the error handled as determined by <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#IGNORE_EXISTING_PK"><code>IGNORE\_EXISTING\_PK</code></a> and <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#ERROR_HANDLING"><code>ERROR\_HANDLING</code></a>. If the specified table does not have a primary key, then this option has no effect. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#TRUE"><code>TRUE</code></a>: Upsert new records when primary keys match existing records. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>: Reject new records when primary keys match existing records. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/InsertRecordsFromQueryResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
