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

# getRecordsFromCollection

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="getRecordsFromCollection(java.lang.Object,com.gpudb.protocol.GetRecordsFromCollectionRequest)">
        <h3>getRecordsFromCollection</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="type-parameters">\<TResponse></span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionResponse" title="class in com.gpudb.protocol">GetRecordsFromCollectionResponse</a>\<TResponse></span> <span className="element-name">getRecordsFromCollection</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a> typeDescriptor, <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest" title="class in com.gpudb.protocol">GetRecordsFromCollectionRequest</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">
          Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as <a href="#deleteRecords(com.gpudb.protocol.DeleteRecordsRequest)"><code>deleteRecords</code></a>.
          <p> This operation supports paging through the data via the <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest#getOffset()"><code>offset</code></a> and <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest#getLimit()"><code>limit</code></a> parameters. </p>
          <p> Note that when using the Java API, it is not possible to retrieve records from join views using this operation. (DEPRECATED)</p>
        </div>

        <div className="dl notes">
          <div className="dt">Type Parameters:</div>
          <div className="dd"><code>TResponse</code> - The type of object being retrieved.</div>
          <div className="dt">Parameters:</div>
          <div className="dd"><code>typeDescriptor</code> - Type descriptor used for decoding returned objects.</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest" 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/GetRecordsFromCollectionResponse" 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="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" className="external-link">IllegalArgumentException</a></code> - if <code>typeDescriptor</code> is not an instance of one of the following: <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a>, <a href="/content/api/java/com/gpudb/TypeObjectMap" title="class in com.gpudb"><code>TypeObjectMap</code></a>, <code>Schema</code>, or a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" className="external-link"><code>Class</code></a> that implements <code>IndexedRecord</code></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="getRecordsFromCollection(java.lang.Object,java.lang.String,long,long,java.util.Map)">
        <h3>getRecordsFromCollection</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="type-parameters">\<TResponse></span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionResponse" title="class in com.gpudb.protocol">GetRecordsFromCollectionResponse</a>\<TResponse></span> <span className="element-name">getRecordsFromCollection</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a> typeDescriptor, <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, long offset, long limit, <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">
          Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as <a href="#deleteRecords(java.lang.String,java.util.List,java.util.Map)"><code>deleteRecords</code></a>.
          <p> This operation supports paging through the data via the <code>offset</code> and <code>limit</code> parameters. </p>
          <p> Note that when using the Java API, it is not possible to retrieve records from join views using this operation. (DEPRECATED)</p>
        </div>

        <div className="dl notes">
          <div className="dt">Type Parameters:</div>
          <div className="dd"><code>TResponse</code> - The type of object being retrieved.</div>
          <div className="dt">Parameters:</div>
          <div className="dd"><code>typeDescriptor</code> - Type descriptor used for decoding returned objects.</div>
          <div className="dd"><code>tableName</code> - Name of the collection or table from which records are to be retrieved, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing collection or table.</div>
          <div className="dd"><code>offset</code> - A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</div>
          <div className="dd"><code>limit</code> - A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> parameter in the server configuration. Use <code>offset</code> and <code>limit</code> to request subsequent pages of results. The default value is -9999.</div>

          <div className="dd">
            <code>options</code> -

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#RETURN_RECORD_IDS"><code>RETURN\_RECORD\_IDS</code></a>: If <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#TRUE"><code>TRUE</code></a> then return the internal record ID along with each returned record. Supported values:

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

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

              <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#EXPRESSION"><code>EXPRESSION</code></a>: Filter expression to apply to the table. The default value is ''. </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/GetRecordsFromCollectionResponse" 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="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" className="external-link">IllegalArgumentException</a></code> - if <code>typeDescriptor</code> is not an instance of one of the following: <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a>, <a href="/content/api/java/com/gpudb/TypeObjectMap" title="class in com.gpudb"><code>TypeObjectMap</code></a>, <code>Schema</code>, or a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" className="external-link"><code>Class</code></a> that implements <code>IndexedRecord</code></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="getRecordsFromCollection(com.gpudb.protocol.GetRecordsFromCollectionRequest)">
        <h3>getRecordsFromCollection</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="type-parameters">\<TResponse></span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionResponse" title="class in com.gpudb.protocol">GetRecordsFromCollectionResponse</a>\<TResponse></span> <span className="element-name">getRecordsFromCollection</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest" title="class in com.gpudb.protocol">GetRecordsFromCollectionRequest</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">
          Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as <a href="#deleteRecords(com.gpudb.protocol.DeleteRecordsRequest)"><code>deleteRecords</code></a>.
          <p> This operation supports paging through the data via the <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest#getOffset()"><code>offset</code></a> and <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest#getLimit()"><code>limit</code></a> parameters. </p>
          <p> Note that when using the Java API, it is not possible to retrieve records from join views using this operation. (DEPRECATED)</p>
        </div>

        <div className="dl notes">
          <div className="dt">Type Parameters:</div>
          <div className="dd"><code>TResponse</code> - The type of object being retrieved.</div>
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest" 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/GetRecordsFromCollectionResponse" 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="getRecordsFromCollection(java.lang.String,long,long,java.util.Map)">
        <h3>getRecordsFromCollection</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="type-parameters">\<TResponse></span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionResponse" title="class in com.gpudb.protocol">GetRecordsFromCollectionResponse</a>\<TResponse></span> <span className="element-name">getRecordsFromCollection</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, long offset, long limit, <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">
          Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as <a href="#deleteRecords(java.lang.String,java.util.List,java.util.Map)"><code>deleteRecords</code></a>.
          <p> This operation supports paging through the data via the <code>offset</code> and <code>limit</code> parameters. </p>
          <p> Note that when using the Java API, it is not possible to retrieve records from join views using this operation. (DEPRECATED)</p>
        </div>

        <div className="dl notes">
          <div className="dt">Type Parameters:</div>
          <div className="dd"><code>TResponse</code> - The type of object being retrieved.</div>
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the collection or table from which records are to be retrieved, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing collection or table.</div>
          <div className="dd"><code>offset</code> - A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</div>
          <div className="dd"><code>limit</code> - A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server's own limit, defined by the <a href="/content/config/#config-main-general" target="_top">max\_get\_records\_size</a> parameter in the server configuration. Use <code>offset</code> and <code>limit</code> to request subsequent pages of results. The default value is -9999.</div>

          <div className="dd">
            <code>options</code> -

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#RETURN_RECORD_IDS"><code>RETURN\_RECORD\_IDS</code></a>: If <a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#TRUE"><code>TRUE</code></a> then return the internal record ID along with each returned record. Supported values:

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

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

              <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsFromCollectionRequest.Options#EXPRESSION"><code>EXPRESSION</code></a>: Filter expression to apply to the table. The default value is ''. </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/GetRecordsFromCollectionResponse" 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>
