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

# getRecordsByColumn

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="getRecordsByColumn(com.gpudb.protocol.GetRecordsByColumnRequest)">
        <h3>getRecordsByColumn</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnResponse" title="class in com.gpudb.protocol">GetRecordsByColumnResponse</a></span> <span className="element-name">getRecordsByColumn</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest" title="class in com.gpudb.protocol">GetRecordsByColumnRequest</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">
          For a given table, retrieves the values from the requested column(s). Maps of column name to the array of values as well as the column data type are returned. This endpoint supports pagination with the <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest#getOffset()"><code>offset</code></a> and <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest#getLimit()"><code>limit</code></a> parameters.
          <p> <a href="/content/concepts/window/" target="_top">Window functions</a>, which can perform operations like moving averages, are available through this endpoint as well as <a href="#createProjection(com.gpudb.protocol.CreateProjectionRequest)"><code>createProjection</code></a>. </p>
          <p> When using pagination, if the table (or the underlying table in the case of a view) is modified (records are inserted, updated, or deleted) during a call to the endpoint, the records or values retrieved may differ between calls based on the type of the update, e.g., the contiguity across pages cannot be relied upon. </p>
          <p> If <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest#getTableName()"><code>tableName</code></a> is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (<a href="/content/concepts/expressions/#date-time-functions" target="_top">NOW()</a>), identity (<a href="/content/concepts/expressions/#user-security-functions" target="_top">USER()</a>), or constant-based functions (<a href="/content/concepts/expressions/#scalar-functions" target="_top">GEODIST(-77.11, 38.88, -71.06, 42.36)</a>). </p>
          <p> The response is returned as a dynamic schema. For details see: <a href="/content/api/concepts/#dynamic-schemas" target="_top">dynamic schemas documentation</a>.</p>
        </div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest" 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/GetRecordsByColumnResponse" 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="getRecordsByColumn(java.lang.String,java.util.List,long,long,java.util.Map)">
        <h3>getRecordsByColumn</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnResponse" title="class in com.gpudb.protocol">GetRecordsByColumnResponse</a></span> <span className="element-name">getRecordsByColumn</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/util/List.html" title="class or interface in java.util" className="external-link">List</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>> columnNames, 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">
          For a given table, retrieves the values from the requested column(s). Maps of column name to the array of values as well as the column data type are returned. This endpoint supports pagination with the <code> offset</code> and <code>limit</code> parameters.
          <p> <a href="/content/concepts/window/" target="_top">Window functions</a>, which can perform operations like moving averages, are available through this endpoint as well as <a href="#createProjection(java.lang.String,java.lang.String,java.util.List,java.util.Map)"><code>createProjection</code></a>. </p>
          <p> When using pagination, if the table (or the underlying table in the case of a view) is modified (records are inserted, updated, or deleted) during a call to the endpoint, the records or values retrieved may differ between calls based on the type of the update, e.g., the contiguity across pages cannot be relied upon. </p>
          <p> If <code>tableName</code> is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (<a href="/content/concepts/expressions/#date-time-functions" target="_top">NOW()</a>), identity (<a href="/content/concepts/expressions/#user-security-functions" target="_top">USER()</a>), or constant-based functions (<a href="/content/concepts/expressions/#scalar-functions" target="_top">GEODIST(-77.11, 38.88, -71.06, 42.36)</a>). </p>
          <p> The response is returned as a dynamic schema. For details see: <a href="/content/api/concepts/#dynamic-schemas" target="_top">dynamic schemas documentation</a>.</p>
        </div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the table or view on which this operation will be performed, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. An empty table name retrieves one record from a single-row virtual table, where columns specified should be constants or constant expressions.</div>
          <div className="dd"><code>columnNames</code> - The list of column values to retrieve.</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 <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnResponse#getHasMoreRecords()"><code>hasMoreRecords</code></a> to see if more records exist in the result to be fetched, and <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/GetRecordsByColumnRequest.Options#EXPRESSION"><code>EXPRESSION</code></a>: Filter expression to apply to the table. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_BY"><code>SORT\_BY</code></a>: Column that the data should be sorted by. Used in conjunction with <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_ORDER"><code>SORT\_ORDER</code></a>. The <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#ORDER_BY"><code>ORDER\_BY</code></a> option can be used in lieu of <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_BY"><code>SORT\_BY</code></a> / <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_ORDER"><code>SORT\_ORDER</code></a>. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_ORDER"><code>SORT\_ORDER</code></a>: String indicating how the returned values should be sorted - <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#ASCENDING"><code>ASCENDING</code></a> or <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#DESCENDING"><code>DESCENDING</code></a>. If <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_ORDER"><code>SORT\_ORDER</code></a> is provided, <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#SORT_BY"><code>SORT\_BY</code></a> has to be provided. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#ASCENDING"><code>ASCENDING</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#DESCENDING"><code>DESCENDING</code></a> </li>
                </ul>

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

              <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#ORDER_BY"><code>ORDER\_BY</code></a>: Comma-separated list of the columns to be sorted by as well as the sort direction, e.g., 'timestamp asc, x desc'. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#CONVERT_WKTS_TO_WKBS"><code>CONVERT\_WKTS\_TO\_WKBS</code></a>: If <a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#TRUE"><code>TRUE</code></a>, then WKT string columns will be returned as WKB bytes. Supported values:

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

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

              <li><a href="/content/api/java/com/gpudb/protocol/GetRecordsByColumnRequest.Options#ROUTE_TO_TOM"><code>ROUTE\_TO\_TOM</code></a>: For multihead record retrieval without shard key expression - specifies from which tom to retrieve data. </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/GetRecordsByColumnResponse" 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>
