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

# aggregateUnique

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

  <h2 className="memtitle"><span className="permalink"><a href="#a97a57f884e4e326b2635f5e8dd6978ec">◆ </a></span>aggregateUnique() <span className="overload">\[1/2]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="mlabels">
        <tr>
          <td className="mlabels-left">
            <table className="memname">
              <tr>
                <td className="memname"><a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse">AggregateUniqueResponse</a> kinetica.Kinetica.aggregateUnique </td>
                <td>(</td>
                <td className="paramtype"><a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest">AggregateUniqueRequest</a></td>
                <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
                <td>)</td>

                <td />
              </tr>
            </table>
          </td>

          <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Returns all the unique values from a particular column (specified by <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a>) of a particular table or view (specified by <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#acb419e2126bcd96e9ab011377ec481f4">table\_name</a>). </p>
      <p>If <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is a numeric column, the values will be in <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#affc782374dad2d0531b8e4c5bc4e853b">data</a>. Otherwise if <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is a string column, the values will be in <code>json\_encoded\_response</code>. The results can be paged via <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#a55c89b7d7b250dd8716a0c78e712e819">offset</a> and <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#acf2c7ac9c6cc7c9aa46fb465d9b55535">limit</a> parameters.</p>
      <p>{"{"}"limit":"10","sort\_order":"descending"{"}"}</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>
      <p>If a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> name is specified in the <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#a3be5b1eadead4a160136d7359db31cbe">options</a>, the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to <a href="/content/concepts/tables/#table" target="_top">standard naming conventions</a>; any column expression will need to be aliased. If the source table's <a href="/content/concepts/tables/#shard-keys" target="_top">shard key</a> is used as the <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a>, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is an unrestricted-length string.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">request\_</td>
              <td>Request 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">Response object containing the result of the operation. </div>
      </div>

      <p className="definition">Definition at line <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs#L6765">6765</a> of file <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs">KineticaFunctions.cs</a>.</p>
    </div>
  </div>

  <div id="a517b2051a453171e92a54b671d9d7218" />

  <h2 className="memtitle"><span className="permalink"><a href="#a517b2051a453171e92a54b671d9d7218">◆ </a></span>aggregateUnique() <span className="overload">\[2/2]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="mlabels">
        <tr>
          <td className="mlabels-left">
            <table className="memname">
              <tr>
                <td className="memname"><a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse">AggregateUniqueResponse</a> kinetica.Kinetica.aggregateUnique </td>
                <td>(</td>
                <td className="paramtype">string</td>
                <td className="paramname"><span className="paramname"><span className="em">table\_name</span></span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">string</td>
                <td className="paramname"><span className="paramname"><span className="em">column\_name</span></span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">long</td>
                <td className="paramname"><span className="paramname"><span className="em">offset</span></span><span className="paramdefsep"> = </span><span className="paramdefval">0</span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">long</td>
                <td className="paramname"><span className="paramname"><span className="em">limit</span></span><span className="paramdefsep"> = </span><span className="paramdefval">-9999</span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">IDictionary\< string, string ></td>
                <td className="paramname"><span className="paramname"><span className="em">options</span></span><span className="paramdefsep"> = </span><span className="paramdefval">null</span> )</td>
              </tr>
            </table>
          </td>

          <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Returns all the unique values from a particular column (specified by <span className="em">column\_name</span> ) of a particular table or view (specified by <span className="em">table\_name</span> ). </p>
      <p>If <span className="em">column\_name</span> is a numeric column, the values will be in <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#affc782374dad2d0531b8e4c5bc4e853b">data</a>. Otherwise if <span className="em">column\_name</span> is a string column, the values will be in <code>json\_encoded\_response</code>. The results can be paged via <span className="em">offset</span> and <span className="em">limit</span> parameters.</p>
      <p>{"{"}"limit":"10","sort\_order":"descending"{"}"}</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>
      <p>If a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> name is specified in the <span className="em">options</span> , the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to <a href="/content/concepts/tables/#table" target="_top">standard naming conventions</a>; any column expression will need to be aliased. If the source table's <a href="/content/concepts/tables/#shard-keys" target="_top">shard key</a> is used as the <span className="em">column\_name</span> , the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of <span className="em">column\_name</span> is an unrestricted-length string.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">table\_name</td>
              <td>Name of an existing table or view on which the 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>.</td>
            </tr>

            <tr>
              <td className="paramname">column\_name</td>
              <td>Name of the column or an expression containing one or more column names on which the unique function would be applied.</td>
            </tr>

            <tr>
              <td className="paramname">offset</td>
              <td>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.</td>
            </tr>

            <tr>
              <td className="paramname">limit</td>
              <td>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 className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#a156ba3da52342edb7cd20496a670f667">has\_more\_records</a> to see if more records exist in the result to be fetched, and <span className="em">offset</span> and <span className="em">limit</span> to request subsequent pages of results. The default value is -9999.</td>
            </tr>

            <tr>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a076e42924db73a09437382111c8f7db7">CREATE\_TEMP\_TABLE</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a9f19da7fa86fb0f9939f2e1e96abf35f">RESULT\_TABLE\_PERSIST</a> is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueResponse_1_1Info#a17b55ecdaba6188b3b3c5a6e171fe087">QUALIFIED\_RESULT\_TABLE\_NAME</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac797c2ba0601ee8147876138c5e64c4d">COLLECTION\_NAME</a>: \[DEPRECATED–please specify the containing schema as part of <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> and use <a className="el" href="#ac754b44062e7b90b8afa50ddfa8ccbf2">createSchema</a> to create the schema if non-existent] Name of a schema which is to contain the table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. If the schema provided is non-existent, it will be automatically created. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a7f3a43059203a87e89373427aa218be6">EXPRESSION</a>: Filter expression to apply to the table. </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a2bd0fc0ab0ffef29e6230f177ccacdec">SORT\_ORDER</a>: String indicating how the returned values should be sorted. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5d4a1a3f6b231aee09e24cae411b40b8">ASCENDING</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a7f459d02a531a1c68448658782abaa39">DESCENDING</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5d4a1a3f6b231aee09e24cae411b40b8">ASCENDING</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a423564b591d5325ae17ecdbe5e97c7de">ORDER\_BY</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 className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>: The name of the table used to store the results, in \[schema\_name.]table\_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>. If present, no results are returned in the response. Not available if <span className="em">column\_name</span> is an unrestricted-length string. </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a9f19da7fa86fb0f9939f2e1e96abf35f">RESULT\_TABLE\_PERSIST</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a>, then the result table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> will be persisted and will not expire unless a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a> is specified. If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>, then the result table will be an in-memory table and will expire unless a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a> is specified otherwise. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac2861662b042394ad57ed99a6ff9e7a1">RESULT\_TABLE\_FORCE\_REPLICATED</a>: Force the result table to be replicated (ignores any sharding). Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ad004e9d292ee8d29969c0f0bfcad83fe">RESULT\_TABLE\_GENERATE\_PK</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> then set a primary key for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aed8a369f4d1dfb23c210be5c659e9fda">CHUNK\_SIZE</a>: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a88da0ae4180ccb5d6941c1131c49ef84">CHUNK\_COLUMN\_MAX\_MEMORY</a>: Indicates the target maximum data size for each column in a chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a75da6dbf077edba67a6e07dc00d19da2">CHUNK\_MAX\_MEMORY</a>: Indicates the target maximum data size for all columns in a chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a787e218bd1cbae111cb2d1c487e38ded">COMPRESSION\_CODEC</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for the result table's columns. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac4d3a9f4f97e3f9d6d7bb46489f6b562">VIEW\_ID</a>: ID of view of which the result table will be a member. The default value is ''. </li>
                </ul>

                The default value is an empty Dictionary.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">Response object containing the result of the operation. </div>
      </div>

      <p className="definition">Definition at line <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs#L7129">7129</a> of file <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs">KineticaFunctions.cs</a>.</p>
    </div>
  </div>

  <div id="ac8a19bb5d9b398cb7556f75a89b48c03" />

  <h2 className="memtitle"><span className="permalink"><a href="#ac8a19bb5d9b398cb7556f75a89b48c03">◆ </a></span>AggregateUniqueAsync() <span className="overload">\[1/2]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="mlabels">
        <tr>
          <td className="mlabels-left">
            <table className="memname">
              <tr>
                <td className="memname">async System.Threading.Tasks.Task\< <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse">AggregateUniqueResponse</a> > kinetica.Kinetica.AggregateUniqueAsync </td>
                <td>(</td>
                <td className="paramtype"><a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest">AggregateUniqueRequest</a></td>
                <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">System.Threading.CancellationToken</td>
                <td className="paramname"><span className="paramname"><span className="em">cancellationToken</span></span><span className="paramdefsep"> = </span><span className="paramdefval">default</span> )</td>
              </tr>
            </table>
          </td>

          <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Returns all the unique values from a particular column (specified by <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a>) of a particular table or view (specified by <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#acb419e2126bcd96e9ab011377ec481f4">table\_name</a>). </p>
      <p>(async)</p>
      <p>If <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is a numeric column, the values will be in <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#affc782374dad2d0531b8e4c5bc4e853b">data</a>. Otherwise if <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is a string column, the values will be in <code>json\_encoded\_response</code>. The results can be paged via <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#a55c89b7d7b250dd8716a0c78e712e819">offset</a> and <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#acf2c7ac9c6cc7c9aa46fb465d9b55535">limit</a> parameters.</p>
      <p>{"{"}"limit":"10","sort\_order":"descending"{"}"}</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>
      <p>If a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> name is specified in the <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#a3be5b1eadead4a160136d7359db31cbe">options</a>, the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to <a href="/content/concepts/tables/#table" target="_top">standard naming conventions</a>; any column expression will need to be aliased. If the source table's <a href="/content/concepts/tables/#shard-keys" target="_top">shard key</a> is used as the <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a>, the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueRequest#ac661b4daebec563998273b4a5501914e">column\_name</a> is an unrestricted-length string.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">request\_</td>
              <td>Request object containing the parameters for the operation.</td>
            </tr>

            <tr>
              <td className="paramname">cancellationToken</td>
              <td>Cancellation token to cancel the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">Task that returns the response object containing the result of the operation.</div>
      </div>

      <p className="definition">Definition at line <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs#L6820">6820</a> of file <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs">KineticaFunctions.cs</a>.</p>
    </div>
  </div>

  <div id="a87061b4e67de01bcb1cd41a286b4ee98" />

  <h2 className="memtitle"><span className="permalink"><a href="#a87061b4e67de01bcb1cd41a286b4ee98">◆ </a></span>AggregateUniqueAsync() <span className="overload">\[2/2]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="mlabels">
        <tr>
          <td className="mlabels-left">
            <table className="memname">
              <tr>
                <td className="memname">async System.Threading.Tasks.Task\< <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse">AggregateUniqueResponse</a> > kinetica.Kinetica.AggregateUniqueAsync </td>
                <td>(</td>
                <td className="paramtype">string</td>
                <td className="paramname"><span className="paramname"><span className="em">table\_name</span></span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">string</td>
                <td className="paramname"><span className="paramname"><span className="em">column\_name</span></span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">long</td>
                <td className="paramname"><span className="paramname"><span className="em">offset</span></span><span className="paramdefsep"> = </span><span className="paramdefval">0</span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">long</td>
                <td className="paramname"><span className="paramname"><span className="em">limit</span></span><span className="paramdefsep"> = </span><span className="paramdefval">-9999</span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">IDictionary\< string, string ></td>
                <td className="paramname"><span className="paramname"><span className="em">options</span></span><span className="paramdefsep"> = </span><span className="paramdefval">null</span>, </td>
              </tr>

              <tr>
                <td className="paramkey" />

                <td />

                <td className="paramtype">System.Threading.CancellationToken</td>
                <td className="paramname"><span className="paramname"><span className="em">cancellationToken</span></span><span className="paramdefsep"> = </span><span className="paramdefval">default</span> )</td>
              </tr>
            </table>
          </td>

          <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Returns all the unique values from a particular column (specified by <span className="em">column\_name</span> ) of a particular table or view (specified by <span className="em">table\_name</span> ). </p>
      <p>(async) </p>
      <p>If <span className="em">column\_name</span> is a numeric column, the values will be in <a className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#affc782374dad2d0531b8e4c5bc4e853b">data</a>. Otherwise if <span className="em">column\_name</span> is a string column, the values will be in <code>json\_encoded\_response</code>. The results can be paged via <span className="em">offset</span> and <span className="em">limit</span> parameters.</p>
      <p>{"{"}"limit":"10","sort\_order":"descending"{"}"}</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>
      <p>If a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> name is specified in the <span className="em">options</span> , the results are stored in a new table with that name–no results are returned in the response. Both the table name and resulting column name must adhere to <a href="/content/concepts/tables/#table" target="_top">standard naming conventions</a>; any column expression will need to be aliased. If the source table's <a href="/content/concepts/tables/#shard-keys" target="_top">shard key</a> is used as the <span className="em">column\_name</span> , the result table will be sharded, in all other cases it will be replicated. Sorting will properly function only if the result table is replicated or if there is only one processing node and should not be relied upon in other cases. Not available if the value of <span className="em">column\_name</span> is an unrestricted-length string.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramname">table\_name</td>
              <td>Name of an existing table or view on which the 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>.</td>
            </tr>

            <tr>
              <td className="paramname">column\_name</td>
              <td>Name of the column or an expression containing one or more column names on which the unique function would be applied.</td>
            </tr>

            <tr>
              <td className="paramname">offset</td>
              <td>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.</td>
            </tr>

            <tr>
              <td className="paramname">limit</td>
              <td>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 className="el" href="/content/api/cs/classkinetica_1_1AggregateUniqueResponse#a156ba3da52342edb7cd20496a670f667">has\_more\_records</a> to see if more records exist in the result to be fetched, and <span className="em">offset</span> and <span className="em">limit</span> to request subsequent pages of results. The default value is -9999.</td>
            </tr>

            <tr>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a076e42924db73a09437382111c8f7db7">CREATE\_TEMP\_TABLE</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a9f19da7fa86fb0f9939f2e1e96abf35f">RESULT\_TABLE\_PERSIST</a> is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueResponse_1_1Info#a17b55ecdaba6188b3b3c5a6e171fe087">QUALIFIED\_RESULT\_TABLE\_NAME</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac797c2ba0601ee8147876138c5e64c4d">COLLECTION\_NAME</a>: \[DEPRECATED–please specify the containing schema as part of <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> and use <a className="el" href="#ac754b44062e7b90b8afa50ddfa8ccbf2">createSchema</a> to create the schema if non-existent] Name of a schema which is to contain the table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. If the schema provided is non-existent, it will be automatically created. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a7f3a43059203a87e89373427aa218be6">EXPRESSION</a>: Filter expression to apply to the table. </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a2bd0fc0ab0ffef29e6230f177ccacdec">SORT\_ORDER</a>: String indicating how the returned values should be sorted. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5d4a1a3f6b231aee09e24cae411b40b8">ASCENDING</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a7f459d02a531a1c68448658782abaa39">DESCENDING</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5d4a1a3f6b231aee09e24cae411b40b8">ASCENDING</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a423564b591d5325ae17ecdbe5e97c7de">ORDER\_BY</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 className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>: The name of the table used to store the results, in \[schema\_name.]table\_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>. If present, no results are returned in the response. Not available if <span className="em">column\_name</span> is an unrestricted-length string. </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a9f19da7fa86fb0f9939f2e1e96abf35f">RESULT\_TABLE\_PERSIST</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a>, then the result table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> will be persisted and will not expire unless a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a> is specified. If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>, then the result table will be an in-memory table and will expire unless a <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a> is specified otherwise. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac2861662b042394ad57ed99a6ff9e7a1">RESULT\_TABLE\_FORCE\_REPLICATED</a>: Force the result table to be replicated (ignores any sharding). Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li>
                    <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ad004e9d292ee8d29969c0f0bfcad83fe">RESULT\_TABLE\_GENERATE\_PK</a>: If <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> then set a primary key for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ab7b28697c61fae06b7876021bc31634e">TRUE</a> </li>
                      <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ae8c2065de405f52f4d32d856b6a606a7">FALSE</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a5129af3c10fe1b6a013db543d5d0284e">TTL</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the table specified in <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a>. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aed8a369f4d1dfb23c210be5c659e9fda">CHUNK\_SIZE</a>: Indicates the number of records per chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a88da0ae4180ccb5d6941c1131c49ef84">CHUNK\_COLUMN\_MAX\_MEMORY</a>: Indicates the target maximum data size for each column in a chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a75da6dbf077edba67a6e07dc00d19da2">CHUNK\_MAX\_MEMORY</a>: Indicates the target maximum data size for all columns in a chunk to be used for the result table. Must be used in combination with the <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#aa9d8e8a96236293304c1cfbe9f64be18">RESULT\_TABLE</a> option. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#a787e218bd1cbae111cb2d1c487e38ded">COMPRESSION\_CODEC</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for the result table's columns. </li>
                  <li> <a className="el" href="/content/api/cs/structkinetica_1_1AggregateUniqueRequest_1_1Options#ac4d3a9f4f97e3f9d6d7bb46489f6b562">VIEW\_ID</a>: ID of view of which the result table will be a member. The default value is ''. </li>
                </ul>

                The default value is an empty Dictionary.
              </td>
            </tr>

            <tr>
              <td className="paramname">cancellationToken</td>
              <td>Cancellation token to cancel the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd">Task that returns the response object containing the result of the operation.</div>
      </div>

      <p className="definition">Definition at line <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs#L7437">7437</a> of file <a className="el" href="https://github.com/kineticadb/kinetica-api-cs/blob/master/Kinetica/KineticaFunctions.cs">KineticaFunctions.cs</a>.</p>
    </div>
  </div>
</div>
