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

# filterByTable

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="filterByTable(com.gpudb.protocol.FilterByTableRequest)">
        <h3>filterByTable</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/FilterByTableResponse" title="class in com.gpudb.protocol">FilterByTableResponse</a></span> <span className="element-name">filterByTable</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest" title="class in com.gpudb.protocol">FilterByTableRequest</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">Filters objects in one table based on objects in another table. The user must specify matching column types from the two tables (i.e. the target table from which objects will be filtered and the source table based on which the filter will be created); the column names need not be the same. If a <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest#getViewName()"><code>viewName</code></a> is specified, then the filtered objects will then be put in a newly created view. The operation is synchronous, meaning that a response will not be returned until all objects are fully available in the result view. The return value contains the count (i.e. the size) of the resulting view.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest" 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/FilterByTableResponse" 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="filterByTable(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.Map)">
        <h3>filterByTable</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/FilterByTableResponse" title="class in com.gpudb.protocol">FilterByTableResponse</a></span> <span className="element-name">filterByTable</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> viewName, <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> columnName, <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> sourceTableName, <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> sourceTableColumnName, <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">Filters objects in one table based on objects in another table. The user must specify matching column types from the two tables (i.e. the target table from which objects will be filtered and the source table based on which the filter will be created); the column names need not be the same. If a <code>viewName</code> is specified, then the filtered objects will then be put in a newly created view. The operation is synchronous, meaning that a response will not be returned until all objects are fully available in the result view. The return value contains the count (i.e. the size) of the resulting view.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the table whose data will be filtered, 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 table.</div>
          <div className="dd"><code>viewName</code> - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. Must not be an already existing table or view. The default value is ''.</div>
          <div className="dd"><code>columnName</code> - Name of the column by whose value the data will be filtered from the table designated by <code> tableName</code>.</div>
          <div className="dd"><code>sourceTableName</code> - Name of the table whose data will be compared against in the table called <code>tableName</code>, 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 table.</div>
          <div className="dd"><code>sourceTableColumnName</code> - Name of the column in the <code> sourceTableName</code> whose values will be used as the filter for table <code>tableName</code>. Must be a geospatial geometry column if in 'spatial' mode; otherwise, Must match the type of the <code>columnName</code>.</div>

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

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#CREATE_TEMP_TABLE"><code>CREATE\_TEMP\_TABLE</code></a>: If <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#TRUE"><code>TRUE</code></a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <code>viewName</code>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a href="/content/api/java/com/gpudb/protocol/FilterByTableResponse.Info#QUALIFIED_VIEW_NAME"><code>QUALIFIED\_VIEW\_NAME</code></a>. Supported values:

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

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

              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#COLLECTION_NAME"><code>COLLECTION\_NAME</code></a>: \[DEPRECATED--please specify the containing schema for the view as part of <code>viewName</code> and use <a href="#createSchema(java.lang.String,java.util.Map)"><code>createSchema</code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema is non-existent, it will be automatically created. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#FILTER_MODE"><code>FILTER\_MODE</code></a>: String indicating the filter mode, either <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#IN_TABLE"><code>IN\_TABLE</code></a> or <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#NOT_IN_TABLE"><code>NOT\_IN\_TABLE</code></a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#IN_TABLE"><code>IN\_TABLE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#NOT_IN_TABLE"><code>NOT\_IN\_TABLE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#IN_TABLE"><code>IN\_TABLE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#MODE"><code>MODE</code></a>: Mode - should be either <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> or <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#NORMAL"><code>NORMAL</code></a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#NORMAL"><code>NORMAL</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> </li>
                </ul>

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

              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#BUFFER"><code>BUFFER</code></a>: Buffer size, in meters. Only relevant for <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. The default value is '0'. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#BUFFER_METHOD"><code>BUFFER\_METHOD</code></a>: Method used to buffer polygons. Only relevant for <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#NORMAL"><code>NORMAL</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#GEOS"><code>GEOS</code></a>: Use geos 1 edge per corner algorithm. </li>
                </ul>

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

              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#MAX_PARTITION_SIZE"><code>MAX\_PARTITION\_SIZE</code></a>: Maximum number of points in a partition. Only relevant for <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. The default value is '0'. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#MAX_PARTITION_SCORE"><code>MAX\_PARTITION\_SCORE</code></a>: Maximum number of points \* edges in a partition. Only relevant for <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. The default value is '8000000'. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#X_COLUMN_NAME"><code>X\_COLUMN\_NAME</code></a>: Name of column containing x value of point being filtered in <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. The default value is 'x'. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#Y_COLUMN_NAME"><code>Y\_COLUMN\_NAME</code></a>: Name of column containing y value of point being filtered in <a href="/content/api/java/com/gpudb/protocol/FilterByTableRequest.Options#SPATIAL"><code>SPATIAL</code></a> mode. The default value is 'y'. </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/FilterByTableResponse" 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>
