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

# alter_table_columns

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.alter_table_columns"> <span className="sig-name descname"><span className="pre">alter\_table\_columns</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">table\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">column\_alterations</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span><span className="sig-paren">)</span><a href="https://github.com/kineticadb/kinetica-api-python/blob/master/gpudb/gpudb.py#L20476"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Apply various modifications to columns in a table, view. The available modifications include the following:</p>
      <p>Create or delete an <a className="reference external" href="/content/concepts/indexes/#column-index">index</a> on a particular column. This can speed up certain operations when using expressions containing equality or relational operators on indexed columns. This only applies to tables.</p>
      <p>Manage a table’s columns–a column can be added, removed, or have its <a className="reference external" href="/content/concepts/types/">type and properties</a> modified, including whether it is <a className="reference external" href="/content/concepts/dictionary_encoding/">dictionary encoded</a> or not.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl simple">
            <div className="dt">table\_name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Table on which the operation will be performed. Must be an existing table or view, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>.</p>
            </div>

            <div className="dt">column\_alterations (<span className="em">list of dicts of str to str</span>) –</div>

            <div className="dd">
              <p>List of alter table add/delete/change column requests - all for the same table. Each request is a map that includes ‘column\_name’, ‘action’ and the options specific for the action. Note that the same options as in alter table requests but in the same map as the column name and the action. For example: \[{"{"}‘column\_name’:’col\_1’,’action’:’change\_column’,’rename\_column’:’col\_2’{"}"},{"{"}‘column\_name’:’col\_1’,’action’:’add\_column’, ‘type’:’int’,’default\_value’:’1’{"}"}]. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">options (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Optional parameters.</p>
            </div>
          </div>
        </div>
      </div>

      <p><strong>Returns</strong></p>

      <div className="blockquote">
        <div>
          <p>A dict with the following entries–</p>

          <div className="dl simple">
            <div className="dt">table\_name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Table on which the operation was performed.</p>
            </div>

            <div className="dt">type\_id (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Return the type\_id (when changing a table, a new type may be created).</p>
            </div>

            <div className="dt">type\_definition (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Return the type\_definition (when changing a table, a new type may be created).</p>
            </div>

            <div className="dt">properties (<span className="em">dict of str to lists of str</span>) –</div>

            <div className="dd">
              <p>Return the type properties (when changing a table, a new type may be created).</p>
            </div>

            <div className="dt">label (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Return the type label (when changing a table, a new type may be created).</p>
            </div>

            <div className="dt">column\_alterations (<span className="em">list of dicts of str to str</span>) –</div>

            <div className="dd">
              <p>List of alter table add/delete/change column requests - all for the same table. Each request is a map that includes ‘column\_name’, ‘action’ and the options specific for the action. Note that the same options as in alter table requests but in the same map as the column name and the action. For example: \[{"{"}‘column\_name’:’col\_1’,’action’:’change\_column’,’rename\_column’:’col\_2’{"}"},{"{"}‘column\_name’:’col\_1’,’action’:’add\_column’, ‘type’:’int’,’default\_value’:’1’{"}"}].</p>
            </div>

            <div className="dt">info (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Additional information.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
