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

# aggregate_unpivot

<div className="kinetica-typedoc">
  <div className="section tsd-panel tsd-member">
    <h3 className="tsd-anchor-link" id="aggregate_unpivot"><span>aggregate\_unpivot</span></h3>

    <ul className="tsd-signatures">
      <li className="">
        <div className="tsd-signature tsd-anchor-link" id="aggregate_unpivot-1"><span className="tsd-kind-call-signature">aggregate\_unpivot</span><span className="tsd-signature-symbol">(</span><br /> <span className="tsd-kind-parameter">table\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">column\_names</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">variable\_column\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">undefined</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">value\_column\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">undefined</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">pivoted\_columns</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">options</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">Record</span><span className="tsd-signature-symbol">\<</span><span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">></span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">callback</span><span className="tsd-signature-symbol">?:</span> <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a><span className="tsd-signature-symbol">,</span><br /><span className="tsd-signature-symbol">)</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/AggregateUnpivotResponse" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotResponse</a><span className="tsd-signature-symbol">></span></div>

        <div className="tsd-description">
          <div className="tsd-comment tsd-typography">
            <p>Rotate the column values into rows values.</p>
            <p>For unpivot details and examples, see Unpivot. For limitations, see Unpivot Limitations.</p>
            <p>Unpivot is used to normalize tables that are built for cross tabular reporting purposes. The unpivot operator rotates the column values for all the pivoted columns. A variable column, value column and all columns from the source table except the unpivot columns are projected into the result table. The variable column and value columns in the result table indicate the pivoted column name and values respectively.</p>
            <p>The response is returned as a dynamic schema. For details see: dynamic schemas documentation.</p>
          </div>

          <div className="tsd-parameters">
            <h4 className="tsd-parameters-title">Parameters</h4>

            <ul className="tsd-parameter-list">
              <li>
                <span><span className="tsd-kind-parameter">table\_name</span>: <span className="tsd-signature-type">string</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Name of the table on which the operation will be performed. Must be an existing table/view, in \[schema\_name.]table\_name format, using standard name resolution rules.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">column\_names</span>: <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>List of column names or expressions. A wildcard '\*' can be used to include all the non-pivoted columns from the source table.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">variable\_column\_name</span>: <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">undefined</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Specifies the variable/parameter column name.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">value\_column\_name</span>: <span className="tsd-signature-type">string</span> <span className="tsd-signature-symbol">|</span> <span className="tsd-signature-type">undefined</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Specifies the value column name.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">pivoted\_columns</span>: <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>List of one or more values typically the column names of the input table. All the columns in the source table must have the same data type.</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">options</span>: <span className="tsd-signature-type">Record</span><span className="tsd-signature-symbol">\<</span><span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">></span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional parameters.</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">callback</span>: <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional callback function</p>
                </div>
              </li>
            </ul>
          </div>

          <h4 className="tsd-returns-title">Returns <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/AggregateUnpivotResponse" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotResponse</a><span className="tsd-signature-symbol">></span></h4>
          <p>Promise\<Types.AggregateUnpivotResponse> - Promise resolving to the response</p>

          <div className="aside tsd-sources">
            <ul>
              <li>Defined in <a href="https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L3731">src/GPUdb.ts:3731</a></li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </div>

  <div className="section tsd-panel tsd-member">
    <h3 className="tsd-anchor-link" id="aggregate_unpivot_request"><span>aggregate\_unpivot\_request</span></h3>

    <ul className="tsd-signatures">
      <li className="">
        <div className="tsd-signature tsd-anchor-link" id="aggregate_unpivot_request-1"><span className="tsd-kind-call-signature">aggregate\_unpivot\_request</span><span className="tsd-signature-symbol">(</span><br /> <span className="tsd-kind-parameter">request</span><span className="tsd-signature-symbol">:</span> <a href="/content/api/nodejs/interfaces/AggregateUnpivotRequest" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotRequest</a><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">callback</span><span className="tsd-signature-symbol">?:</span> <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a><span className="tsd-signature-symbol">,</span><br /><span className="tsd-signature-symbol">)</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/AggregateUnpivotResponse" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotResponse</a><span className="tsd-signature-symbol">></span></div>

        <div className="tsd-description">
          <div className="tsd-comment tsd-typography">
            <p>Rotate the column values into rows values.</p>
            <p>For unpivot details and examples, see Unpivot. For limitations, see Unpivot Limitations.</p>
            <p>Unpivot is used to normalize tables that are built for cross tabular reporting purposes. The unpivot operator rotates the column values for all the pivoted columns. A variable column, value column and all columns from the source table except the unpivot columns are projected into the result table. The variable column and value columns in the result table indicate the pivoted column name and values respectively.</p>
            <p>The response is returned as a dynamic schema. For details see: dynamic schemas documentation.</p>
          </div>

          <div className="tsd-parameters">
            <h4 className="tsd-parameters-title">Parameters</h4>

            <ul className="tsd-parameter-list">
              <li>
                <span><span className="tsd-kind-parameter">request</span>: <a href="/content/api/nodejs/interfaces/AggregateUnpivotRequest" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotRequest</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Request object containing the parameters for the operation</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">callback</span>: <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional callback function</p>
                </div>
              </li>
            </ul>
          </div>

          <h4 className="tsd-returns-title">Returns <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/AggregateUnpivotResponse" className="tsd-signature-type tsd-kind-interface">AggregateUnpivotResponse</a><span className="tsd-signature-symbol">></span></h4>
          <p>Promise\<Types.AggregateUnpivotResponse> - Promise resolving to the response</p>

          <div className="aside tsd-sources">
            <ul>
              <li>Defined in <a href="https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L3682">src/GPUdb.ts:3682</a></li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </div>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.