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

# gpudbtable

> gpudbtable — Kinetica Python API

<div className="kinetica-pydoc">
  <div itemprop="articleBody">
    <div id="class-gpudbtable" className="section">
      <h1>Class GPUdbTable</h1>

      <div className="dl py class">
        <div className="dt sig sig-object py" id="gpudb.GPUdbTable"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-prename descclassname"><span className="pre">gpudb.</span></span><span className="sig-name descname"><span className="pre">GPUdbTable</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">\_type</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">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">options</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">db</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">read\_only\_table\_count</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">delete\_temporary\_views</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">temporary\_view\_names</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">create\_views</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">use\_multihead\_io</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">use\_multihead\_ingest</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">multihead\_ingest\_batch\_size</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">10000</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">flush\_multi\_head\_ingest\_per\_insertion</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">convert\_special\_types\_on\_retrieval</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span><span className="sig-paren">)</span></div>

        <div className="dd">
          <p><strong>Parameters</strong></p>

          <blockquote>
            <div>
              <div className="dl">
                <div className="dt">\_type (<code className="xref py py-class docutils literal notranslate"><span className="pre">RecordType</span></code> or <a className="reference internal" href="/content/api/python/source/gpudbrecordtype#gpudb.GPUdbRecordType" title="gpudb.GPUdbRecordType"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbRecordType</span></code></a> or list of lists of str) –</div>

                <div className="dd">
                  <p>Either a <a className="reference internal" href="/content/api/python/source/gpudbrecordtype#gpudb.GPUdbRecordType" title="gpudb.GPUdbRecordType"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbRecordType</span></code></a> or <code className="xref py py-class docutils literal notranslate"><span className="pre">RecordType</span></code> object which represents a type for the table, or a nested list of lists, where each internal list has the format of:</p>

                  <div className="highlight-default notranslate">
                    ```
                    # Just the name and type
                    [ "name", "type (double, int etc.)" ]

                    # Name, type, and one column property
                    [ "name", "type (double, int etc.)", "nullable" ]

                    # Name, type, and multiple column properties
                    [ "name", "string", "char4", "nullable" ]
                    ```
                  </div>

                  <p>Pass None for collections. If creating a GPUdbTable object for a pre-existing table, then also pass None.</p>
                  <p>If no table with the given name exists, then the given type will be created in GPUdb before creating the table.</p>
                  <p>Default is None.</p>
                </div>

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

                <div className="dd">
                  <p>The name for the table. if none provided, then a random name will be generated using <a className="reference internal" href="#gpudb.GPUdbTable.random_name" title="gpudb.GPUdbTable.random_name"><code className="xref py py-meth docutils literal notranslate"><span className="pre">random\_name()</span></code></a>. The name may contain the schema name (separated by a period). Alternatively, if the table name has no schema name but a collection name is specified via the options, that collection name will be treated as the schema name. Must not specify a schema name in this argument <span className="em">and</span> specify a collection name also. The fully qualified version of the table name, i.e. ‘schema\_name.table\_name’ will be used for all endpoint calls internally.</p>
                </div>

                <div className="dt">options (<span className="em">GPUdbTableOptions or dict</span>) –</div>

                <div className="dd">
                  <p>A <a className="reference internal" href="/content/api/python/source/gpudbtableoptions#gpudb.GPUdbTableOptions" title="gpudb.GPUdbTableOptions"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableOptions</span></code></a> object or a dict containing options for the table creation.</p>
                </div>

                <div className="dt">db (<span className="em">GPUdb</span>) –</div>

                <div className="dd">
                  <p>A <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb" title="gpudb.GPUdb"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdb</span></code></a> object that allows the user to connect to the GPUdb server.</p>
                </div>

                <div className="dt">read\_only\_table\_count (<span className="em">int</span>) –</div>

                <div className="dd">
                  <p>For known read-only tables, provide the number of records in it. Integer. Must provide the name of the table.</p>
                </div>

                <div className="dt">delete\_temporary\_views (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>If true, then in terminal queries–queries that can not be chained–delete the temporary views upon completion. Defaults to True.</p>
                </div>

                <div className="dt">create\_views (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>Indicates whether or not to create views for this table.</p>
                </div>

                <div className="dt">temporary\_view\_names (<span className="em">list</span>) –</div>

                <div className="dd">
                  <p>Optional list of temporary view names (that ought to be deleted upon terminal queries)</p>
                </div>

                <div className="dt">use\_multihead\_io (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>Indicates whether or not to use multi-head input and output (meaning ingestion and lookup). Default is False. Note that multi-head ingestion is more computation intensive for sharded tables, and it is probably advisable only if there is a heavy ingestion load. Choose carefully.</p>
                  <p>Please see documentation of parameters <span className="em">multihead\_ingest\_batch\_size</span> and <span className="em">flush\_multi\_head\_ingest\_per\_insertion</span> for controlling the multi-head ingestion related behavior.</p>
                </div>

                <div className="dt">use\_multihead\_ingest (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>Indicates whether or not to use multi-head ingestion, if available upon insertion. Note that multi-head ingestion is more computation intensive for sharded tables, and it is probably advisable only if there is a heavy ingestion load. Default is False. Will be deprecated in version 7.0.</p>
                </div>

                <div className="dt">multihead\_ingest\_batch\_size (<span className="em">int</span>) –</div>

                <div className="dd">
                  <p>Used only in conjunction with <span className="em">use\_multihead\_ingest</span>; ignored otherwise. Sets the batch size to be used for the ingestor. Must be greater than zero. Default is 10,000. The multi-head ingestor flushes the inserted records every <span className="em">multihead\_ingest\_batch\_size</span> automatically, unless <span className="em">flush\_multi\_head\_ingest\_automatically</span> is False. Any remaining records would have to be manually flushed using <a className="reference internal" href="#gpudb.GPUdbTable.flush_data_to_server" title="gpudb.GPUdbTable.flush_data_to_server"><code className="xref py py-meth docutils literal notranslate"><span className="pre">flush\_data\_to\_server()</span></code></a> by the user, or will be automatically flushed per <a className="reference internal" href="#gpudb.GPUdbTable.insert_records" title="gpudb.GPUdbTable.insert_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">insert\_records()</span></code></a> if <span className="em">flush\_multi\_head\_ingest\_automatically</span> is True.</p>
                </div>

                <div className="dt">flush\_multi\_head\_ingest\_per\_insertion (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>Used only in conjunction with <span className="em">use\_multihead\_ingest</span>; ignored otherwise. If True, flushes the multi-head ingestor in every <a className="reference internal" href="#gpudb.GPUdbTable.insert_records" title="gpudb.GPUdbTable.insert_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">insert\_records()</span></code></a> call. Otherwise, the multi-head ingestor flushes the data to the server when a worker queue reaches <span className="em">multihead\_ingest\_batch\_size</span> in size, and any remaining records will have to be manually flushed using <a className="reference internal" href="#gpudb.GPUdbTable.flush_data_to_server" title="gpudb.GPUdbTable.flush_data_to_server"><code className="xref py py-meth docutils literal notranslate"><span className="pre">flush\_data\_to\_server()</span></code></a>. Default False.</p>
                </div>

                <div className="dt">convert\_special\_types\_on\_retrieval (<span className="em">bool</span>) –</div>

                <div className="dd">
                  <p>Convert array types to list and JSON types to dicts while retrieval. Default False.</p>
                </div>
              </div>
            </div>
          </blockquote>

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

          <blockquote>
            <div>
              <p>A GPUdbTable object.</p>
            </div>
          </blockquote>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.random_name"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">random\_name</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Returns a randomly generated UUID-based name. Use underscores instead of hyphens.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.prefix_name"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">prefix\_name</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">val</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Returns a random name with the specified prefix</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.size"> <span className="sig-name descname"><span className="pre">size</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Return the table’s size/length/count.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.set_logger_level"> <span className="sig-name descname"><span className="pre">set\_logger\_level</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">log\_level</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Set the log level for the GPUdbTable class and any multi-head i/o related classes it uses.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">log\_level (<span className="em">int or str</span>) –</div>

                    <div className="dd">
                      <p>A valid log level for the logging module</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.table_name"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">table\_name</span></span></div>

            <div className="dd">
              <p>Return user given name for this table (or the randomly generated one, if applicable).</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.name"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">name</span></span></div>

            <div className="dd">
              <p>Return user given name for this table (or the randomly generated one, if applicable). Return the qualified version</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.qualified_table_name"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">qualified\_table\_name</span></span></div>

            <div className="dd">
              <p>Return the fully qualified name for this table, including any schemas.</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.is_read_only"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">is\_read\_only</span></span></div>

            <div className="dd">
              <p>Is the table read-only, or can we modify it?</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.count"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">count</span></span></div>

            <div className="dd">
              <p>Return the table’s size/length/count.</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.is_collection"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">is\_collection</span></span></div>

            <div className="dd">
              <p>Returns True if the table is a collection; False otherwise.</p>
            </div>
          </div>

          <div className="dl py property">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.collection_name"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">collection\_name</span></span></div>

            <div className="dd">
              <p>Returns the name of the collection this table is a member of; None if this table does not belong to any collection.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.is_replicated"> <span className="sig-name descname"><span className="pre">is\_replicated</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Returns True if the table is replicated.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_table_type"> <span className="sig-name descname"><span className="pre">get\_table\_type</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Return the table’s (record) type (the GPUdbRecordType object, not the c-extension RecordType).</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.alias"> <span className="sig-name descname"><span className="pre">alias</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">alias</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Create an alias string for this table.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>A string that contains the alias.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A string with the format “this-table-name as alias”.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.create_view"> <span className="sig-name descname"><span className="pre">create\_view</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">count</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></div>

            <div className="dd">
              <p>Given a view name and a related response, create a new GPUdbTable object which is a read-only table with the intermediate tables automatically updated.</p>
              <p><strong>Returns</strong></p>

              <blockquote>
                <div>
                  <p>A <a className="reference internal" href="#gpudb.GPUdbTable" title="gpudb.GPUdbTable"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTable</span></code></a> object</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.cleanup"> <span className="sig-name descname"><span className="pre">cleanup</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Clear/drop all intermediate tables if settings allow it.</p>
              <p><strong>Returns</strong></p>

              <blockquote>
                <div>
                  <p>self for enabling chaining method invocations.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.exists"> <span className="sig-name descname"><span className="pre">exists</span></span><span className="sig-paren">(</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Checks for the existence of a table with the given name.</p>
              <p><strong>Returns</strong></p>

              <blockquote>
                <div>
                  <p>A boolean flag indicating whether the table currently –</p>
                  <p>exists in the database.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.flush_data_to_server"> <span className="sig-name descname"><span className="pre">flush\_data\_to\_server</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>If multi-head ingestion is enabled, then flush all records in the ingestors’ worker queues so that they actually get inserted to the server database.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.convert_special_type_values_in_insert_records"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">convert\_special\_type\_values\_in\_insert\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">record\_type</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><a className="reference internal" href="/content/api/python/source/gpudbrecordtype#gpudb.GPUdbRecordType" title="gpudb.GPUdbRecordType"><span className="pre">GPUdbRecordType</span></a></span></span>, <span className="em sig-param"><span className="n"><span className="pre">record</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">list</span><span className="w"> </span><span className="p"><span className="pre">|</span></span><span className="w"> </span><span className="pre">dict</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Convert any special value types (array, json, vector etc.) of a single record suitably</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">record\_type (<span className="em">GPUdbRecordType</span>) –</div>

                    <div className="dd">
                      <p>the record type for the record</p>
                    </div>

                    <div className="dt">record (<span className="em">Union\[ list, dict]</span>) –</div>

                    <div className="dd">
                      <p>A single record (list or dict)</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">object –</div>

                    <div className="dd">
                      <p>the record with converted values</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.convert_special_type_values_in_get_records"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">convert\_special\_type\_values\_in\_get\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">record\_type</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><a className="reference internal" href="/content/api/python/source/gpudbrecordtype#gpudb.GPUdbRecordType" title="gpudb.GPUdbRecordType"><span className="pre">GPUdbRecordType</span></a></span></span>, <span className="em sig-param"><span className="n"><span className="pre">records</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">list</span><span className="w"> </span><span className="p"><span className="pre">|</span></span><span className="w"> </span><span className="pre">dict</span><span className="w"> </span><span className="p"><span className="pre">|</span></span><span className="w"> </span><span className="pre">List</span><span className="p"><span className="pre">\[</span></span><span className="pre">Record</span><span className="p"><span className="pre">]</span></span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Convert any special value type (array, json, vector etc.) suitably</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">record\_type (<span className="em">GPUdbRecordType</span>) –</div>

                    <div className="dd">
                      <p>the record type for these ‘records’</p>
                    </div>

                    <div className="dt">records (<span className="em">Union\[Union\[ list, dict], List\[Record]]</span>) –</div>

                    <div className="dd">
                      <p>A single record value (list or dict)</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">object –</div>

                    <div className="dd">
                      <p>the converted value</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.insert_records"> <span className="sig-name descname"><span className="pre">insert\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="o"><span className="pre">\*</span></span><span className="n"><span className="pre">args</span></span></span>, <span className="em sig-param"><span className="o"><span className="pre">\*\*</span></span><span className="n"><span className="pre">kwargs</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Insert one or more records.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">args –</div>

                    <div className="dd">
                      <p>Values for all columns of a single record or multiple records. For a single record, use either of the following syntaxes:</p>

                      <div className="highlight-default notranslate">
                        ```
                        insert_records( 1, 2, 3 )
                        insert_records( [1, 2, 3] )
                        ```
                      </div>

                      <p>For multiple records, use either of the following syntaxes:</p>

                      <div className="highlight-default notranslate">
                        ```
                        insert_records( [ [1, 2, 3], [4, 5, 6] ] )
                        insert_records(   [1, 2, 3], [4, 5, 6]   )
                        ```
                      </div>

                      <p>Also, the user can use keyword arguments to pass in values:</p>

                      <div className="highlight-default notranslate">
                        ```
                        # For a record type with two integers named 'a' and 'b':
                        insert_records( {"a":  1, "b":  1},
                                        {"a": 42, "b": 32} )

                        # Also can use a list to pass the dicts
                        insert_records( [ {"a":  1, "b":  1},
                                          {"a": 42, "b": 32} ] )
                        ```
                      </div>

                      <p>Additionally, the user may provide options for the insertion operation. For example:</p>

                      <div className="highlight-default notranslate">
                        ```
                        insert_records( [1, 2, 3], [4, 5, 6],
                                        options = {"return_record_ids": "true"} )
                        ```
                      </div>
                    </div>

                    <div className="dt">kwargs –</div>

                    <div className="dd">
                      <p>Values for all columns for a single record. Mutually exclusive with args (i.e. cannot provide both) when it only contains data.</p>
                      <p>May contain an ‘options’ keyword arg which will be passed to the database for the insertion operation.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A <a className="reference internal" href="#gpudb.GPUdbTable" title="gpudb.GPUdbTable"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTable</span></code></a> object with the insert\_records() –</p>
                  <p>response fields converted to attributes and stored within.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.insert_records_random"> <span className="sig-name descname"><span className="pre">insert\_records\_random</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">count</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Generates a specified number of random records and adds them to the given table. There is an optional parameter that allows the user to customize the ranges of the column values. It also allows the user to specify linear profiles for some or all columns in which case linear values are generated rather than random ones. Only individual tables are supported for this operation.</p>
              <p>This operation is synchronous, meaning that a response will not be returned until all random records are fully available.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">count (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Number of records to generate.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameter to pass in specifications for the randomness of the values. This map is different from the <span className="em">options</span> parameter of most other endpoints in that it is a map of string to map of string to doubles, while most others are maps of string to string. In this map, the top level keys represent which column’s parameters are being specified, while the internal keys represents which parameter is being specified. These parameters take on different meanings depending on the type of the column. Below follows a more detailed description of the map: Default value is an empty dict ( {"{"}{"}"} ). Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>seed</strong> – If provided, the internal random number generator will be initialized with the given value. The minimum is 0. This allows for the same set of random numbers to be generated across invocation of this endpoint in case the user wants to repeat the test. Since input parameter <span className="em">options</span>, is a map of maps, we need an internal map to provide the seed value. For example, to pass 100 as the seed value through this parameter, you need something equivalent to: ‘options’ = {"{"}‘seed’: {"{"} ‘value’: 100 {"}"} {"}"} Allowed keys are:</p>

                          <ul>
                            <li>
                              <p><strong>value</strong> – Pass the seed value here.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>all</strong> – This key indicates that the specifications relayed in the internal map are to be applied to all columns of the records. Allowed keys are:</p>

                          <ul>
                            <li>
                              <p><strong>min</strong> – For numerical columns, the minimum of the generated values is set to this value. Default is -99999. For point, shape, and track semantic types, min for numeric ‘x’ and ‘y’ columns needs to be within \[-180, 180] and \[-90, 90], respectively. The default minimum possible values for these columns in such cases are -180.0 and -90.0. For the ‘TIMESTAMP’ column, the default minimum corresponds to Jan 1, 2010. For string columns, the minimum length of the randomly generated strings is set to this value (default is 0). If both minimum and maximum are provided, minimum must be less than or equal to max. Value needs to be within \[0, 200]. If the min is outside the accepted ranges for strings columns and ‘x’ and ‘y’ columns for point/shape/track types, then those parameters will not be set; however, an error will not be thrown in such a case. It is the responsibility of the user to use the <span className="em">all</span> parameter judiciously.</p>
                            </li>

                            <li>
                              <p><strong>max</strong> – For numerical columns, the maximum of the generated values is set to this value. Default is 99999. For point, shape, and track semantic types, max for numeric ‘x’ and ‘y’ columns needs to be within \[-180, 180] and \[-90, 90], respectively. The default minimum possible values for these columns in such cases are 180.0 and 90.0. For string columns, the maximum length of the randomly generated strings is set to this value (default is 200). If both minimum and maximum are provided, <span className="em">max</span> must be greater than or equal to <span className="em">min</span>. Value needs to be within \[0, 200]. If the <span className="em">max</span> is outside the accepted ranges for strings columns and ‘x’ and ‘y’ columns for point/shape/track types, then those parameters will not be set; however, an error will not be thrown in such a case. It is the responsibility of the user to use the <span className="em">all</span> parameter judiciously.</p>
                            </li>

                            <li>
                              <p><strong>interval</strong> – If specified, generate values for all columns evenly spaced with the given interval value. If a max value is specified for a given column the data is randomly generated between min and max and decimated down to the interval. If no max is provided the data is linearly generated starting at the minimum value (instead of generating random data). For non-decimated string-type columns the interval value is ignored. Instead the values are generated following the pattern: ‘attrname\_creationIndex#’, i.e. the column name suffixed with an underscore and a running counter (starting at 0). For string types with limited size (e.g., char4) the prefix is dropped. No nulls will be generated for nullable columns.</p>
                            </li>

                            <li>
                              <p><strong>null\_percentage</strong> – If specified, then generate the given percentage of the count as nulls for all nullable columns. This option will be ignored for non-nullable columns. The value must be within the range \[0, 1.0]. The default value is 5% (0.05).</p>
                            </li>

                            <li>
                              <p><strong>cardinality</strong> – If specified, limit the randomly generated values to a fixed set. Not allowed on a column with interval specified, and is not applicable to WKT or Track-specific columns. The value must be greater than 0. This option is disabled by default.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>attr\_name</strong> – Set the following parameters for the column specified by the key. This overrides any parameter set by <span className="em">all</span>. Allowed keys are:</p>

                          <ul>
                            <li>
                              <p><strong>min</strong> – For numerical columns, the minimum of the generated values is set to this value. Default is -99999. For point, shape, and track semantic types, min for numeric ‘x’ and ‘y’ columns needs to be within \[-180, 180] and \[-90, 90], respectively. The default minimum possible values for these columns in such cases are -180.0 and -90.0. For the ‘TIMESTAMP’ column, the default minimum corresponds to Jan 1, 2010. For string columns, the minimum length of the randomly generated strings is set to this value (default is 0). If both minimum and maximum are provided, minimum must be less than or equal to max. Value needs to be within \[0, 200]. If the min is outside the accepted ranges for strings columns and ‘x’ and ‘y’ columns for point/shape/track types, then those parameters will not be set; however, an error will not be thrown in such a case. It is the responsibility of the user to use the <span className="em">all</span> parameter judiciously.</p>
                            </li>

                            <li>
                              <p><strong>max</strong> – For numerical columns, the maximum of the generated values is set to this value. Default is 99999. For point, shape, and track semantic types, max for numeric ‘x’ and ‘y’ columns needs to be within \[-180, 180] and \[-90, 90], respectively. The default minimum possible values for these columns in such cases are 180.0 and 90.0. For string columns, the maximum length of the randomly generated strings is set to this value (default is 200). If both minimum and maximum are provided, <span className="em">max</span> must be greater than or equal to <span className="em">min</span>. Value needs to be within \[0, 200]. If the <span className="em">max</span> is outside the accepted ranges for strings columns and ‘x’ and ‘y’ columns for point/shape/track types, then those parameters will not be set; however, an error will not be thrown in such a case. It is the responsibility of the user to use the <span className="em">all</span> parameter judiciously.</p>
                            </li>

                            <li>
                              <p><strong>interval</strong> – If specified, generate values for all columns evenly spaced with the given interval value. If a max value is specified for a given column the data is randomly generated between min and max and decimated down to the interval. If no max is provided the data is linearly generated starting at the minimum value (instead of generating random data). For non-decimated string-type columns the interval value is ignored. Instead the values are generated following the pattern: ‘attrname\_creationIndex#’, i.e. the column name suffixed with an underscore and a running counter (starting at 0). For string types with limited size (e.g., char4) the prefix is dropped. No nulls will be generated for nullable columns.</p>
                            </li>

                            <li>
                              <p><strong>null\_percentage</strong> – If specified and if this column is nullable, then generate the given percentage of the count as nulls. This option will result in an error if the column is not nullable. The value must be within the range \[0, 1.0]. The default value is 5% (0.05).</p>
                            </li>

                            <li>
                              <p><strong>cardinality</strong> – If specified, limit the randomly generated values to a fixed set. Not allowed on a column with interval specified, and is not applicable to WKT or Track-specific columns. The value must be greater than 0. This option is disabled by default.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>track\_length</strong> – This key-map pair is only valid for track type data sets (an error is thrown otherwise). No nulls would be generated for nullable columns. Allowed keys are:</p>

                          <ul>
                            <li>
                              <p><strong>min</strong> – Minimum possible length for generated series; default is 100 records per series. Must be an integral value within the range \[1, 500]. If both min and max are specified, min must be less than or equal to max.</p>
                            </li>

                            <li>
                              <p><strong>max</strong> – Maximum possible length for generated series; default is 500 records per series. Must be an integral value within the range \[1, 500]. If both min and max are specified, max must be greater than or equal to min.</p>
                            </li>
                          </ul>
                        </li>
                      </ul>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A <a className="reference internal" href="#gpudb.GPUdbTable" title="gpudb.GPUdbTable"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTable</span></code></a> object with the insert\_records() response –</p>
                  <p>fields converted to attributes (<span className="em">and stored within</span>) –</p>
                  <p>following entries</p>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span>.</p>
                    </div>

                    <div className="dt">count (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Value of input parameter <span className="em">count</span>.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_records_by_key"> <span className="sig-name descname"><span className="pre">get\_records\_by\_key</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">key\_values</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">expression</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</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></div>

            <div className="dd">
              <p>Fetches the record(s) from the appropriate worker rank directly (or, if multi-head record retrieval is not set up, then from the head node) that map to the given shard key.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">key\_values (<span className="em">list or dict</span>) –</div>

                    <div className="dd">
                      <p>Values for the sharding columns of the record to fetch either in a list (then it is assumed to be in the order of the sharding keys in the record type) or a dict. Must not have any missing sharding/primary column value or any extra column values.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameter. If given, it is passed to /get/records as a filter expression.</p>
                    </div>

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

                    <div className="dd">
                      <p>Any /get/records options to be passed onto the GPUdb server. Optional parameter.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The decoded records.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_records"> <span className="sig-name descname"><span className="pre">get\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Retrieves records from a given table, optionally filtered by an expression and/or sorted by a column. This operation can be performed on tables, views, or on homogeneous collections (collections containing tables of all the same type). Records can be returned encoded as binary or json.</p>
              <p>This operation supports paging through the data via the input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> parameters. Note that when paging through a table, if the table (or the underlying table in case of a view) is updated (records are inserted, deleted or modified) the records retrieved may differ between calls based on the updates applied.</p>
              <p>Decodes and returns the fetched records.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). Default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the maximum number of results to be returned. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. Default value is -9999.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records. Default value is ‘binary’. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Default value is an empty dict ( {"{"}{"}"} ). Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>expression</strong> – Optional filter expression to apply to the table.</p>
                        </li>

                        <li>
                          <p><strong>fast\_index\_lookup</strong> – Indicates if indexes should be used to perform the lookup for a given expression if possible. Only applicable if there is no sorting, the expression contains only equivalence comparisons based on existing tables indexes and the range of requested values is from \[0 to END\_OF\_SET]. The default value is true.</p>
                        </li>

                        <li>
                          <p><strong>sort\_by</strong> – Optional column that the data should be sorted by. Empty by default (i.e. no sorting is applied).</p>
                        </li>

                        <li>
                          <p><strong>sort\_order</strong> – String indicating how the returned values should be sorted - ascending or descending. If sort\_order is provided, sort\_by has to be provided. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>ascending</p>
                            </li>

                            <li>
                              <p>descending</p>
                            </li>
                          </ul>

                          <p>The default value is ‘ascending’.</p>
                        </li>
                      </ul>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects containing the record values.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_records_by_column"> <span className="sig-name descname"><span className="pre">get\_records\_by\_column</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">print\_data</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">get\_column\_major</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>For a given table, retrieves the values of the given columns within a given range. It returns maps of column name to the vector of values for each supported data type (double, float, long, int and string). This operation supports pagination feature, i.e. values that are retrieved are those associated with the indices between the start (offset) and end value (offset + limit) parameters (inclusive). If there are num\_points values in the table then each of the indices between 0 and num\_points-1 retrieves a unique value.</p>
              <p>Note that when using the pagination feature, if the table (or the underlying table in case of a view) is updated (records are inserted, deleted or modified) the records or values retrieved may differ between calls (noncontiguous or overlap) based on the type of the update.</p>
              <p>The response is returned as a dynamic schema. For details see: <a className="reference external" href="/content/api/#dynamic-schemas">dynamic schemas documentation</a>.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>The list of column values to retrieve.</p>
                    </div>

                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the maximum number of results to be returned (if not provided the default is -9999), or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records; either ‘binary’ or ‘json’. Default value is ‘binary’. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Default value is an empty dict ( {"{"}{"}"} ). Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>expression</strong> – Optional filter expression to apply to the table.</p>
                        </li>

                        <li>
                          <p><strong>sort\_by</strong> – Optional column that the data should be sorted by. Empty by default (i.e. no sorting is applied).</p>
                        </li>

                        <li>
                          <p><strong>sort\_order</strong> – String indicating how the returned values should be sorted - ascending or descending. Default is ‘ascending’. If sort\_order is provided, sort\_by has to be provided. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>ascending</p>
                            </li>

                            <li>
                              <p>descending</p>
                            </li>
                          </ul>

                          <p>The default value is ‘ascending’.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – Comma-separated list of the columns to be sorted by; e.g. ‘timestamp asc, x desc’. The columns specified must be present in input parameter <span className="em">column\_names</span>. If any alias is given for any column name, the alias must be used, rather than the original column name.</p>
                        </li>
                      </ul>
                    </div>

                    <div className="dt">print\_data (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If True, print the fetched data to the console in a tabular format if the data is being returned in the column-major format. Default is False.</p>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>

                    <div className="dt">get\_column\_major (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates if the decoded records will be transposed to be column-major or returned as is (row-major). Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p>Decodes the fetched records and saves them in the response class in an attribute called data.</p>
              <p><strong>Returns</strong></p>

              <blockquote>
                <div>
                  <p>A dict of column name to column values for column-major data, or –</p>
                  <p>a list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects for row-major data.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_records_by_series"> <span className="sig-name descname"><span className="pre">get\_records\_by\_series</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">world\_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">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">250</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Retrieves the complete series/track records from the given input parameter <span className="em">world\_table\_name</span> based on the partial track information contained in the input parameter <span className="em">table\_name</span>.</p>
              <p>This operation supports paging through the data via the input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> parameters.</p>
              <p>In contrast to <a className="reference internal" href="#gpudb.GPUdbTable.get_records" title="gpudb.GPUdbTable.get_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">get\_records()</span></code></a> this returns records grouped by series/track. So if input parameter <span className="em">offset</span> is 0 and input parameter <span className="em">limit</span> is 5 this operation would return the first 5 series/tracks in input parameter <span className="em">table\_name</span>. Each series/track will be returned sorted by their TIMESTAMP column.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the table containing the complete series/track information to be returned for the tracks present in the input parameter <span className="em">table\_name</span>. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.</p>
                    </div>

                    <div className="dt">offset (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). Default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

                    <div className="dt">limit (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the maximum number of series/tracks to be returned. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. Default value is 250.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records; either ‘binary’ or ‘json’. Default value is ‘binary’. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A list of list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects containing the record values. –</p>
                  <p>Each external record corresponds to a single track (<span className="em">or series</span>)</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_records_from_collection"> <span className="sig-name descname"><span className="pre">get\_records\_from\_collection</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Retrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as <a className="reference internal" href="#gpudb.GPUdbTable.delete_records" title="gpudb.GPUdbTable.delete_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">delete\_records()</span></code></a>.</p>
              <p>This operation supports paging through the data via the input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> parameters.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). Default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. Default value is -9999.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records; either ‘binary’ or ‘json’. Default value is ‘binary’. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Default value is an empty dict ( {"{"}{"}"} ). Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>return\_record\_ids</strong> – If ‘true’ then return the internal record ID along with each returned record. Default is ‘false’. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects containing the record values.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.get_geo_json"> <span className="sig-name descname"><span className="pre">get\_geo\_json</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Retrieves records as a GeoJSON from a given table, optionally filtered by an expression and/or sorted by a column. This operation can be performed on tables, views, or on homogeneous collections (collections containing tables of all the same type). Records can be returned encoded as binary or json.</p>
              <p>This operation supports paging through the data via the input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> parameters. Note that when paging through a table, if the table (or the underlying table in case of a view) is updated (records are inserted, deleted or modified) the records retrieved may differ between calls based on the updates applied.</p>
              <p>Decodes and returns the fetched records.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the number of initial results to skip (this can be useful for paging through the results). Default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>A positive integer indicating the maximum number of results to be returned. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. Default value is -9999.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records. Default value is ‘binary’. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Default value is an empty dict ( {"{"}{"}"} ). Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>expression</strong> – Optional filter expression to apply to the table.</p>
                        </li>

                        <li>
                          <p><strong>fast\_index\_lookup</strong> – Indicates if indexes should be used to perform the lookup for a given expression if possible. Only applicable if there is no sorting, the expression contains only equivalence comparisons based on existing tables indexes and the range of requested values is from \[0 to END\_OF\_SET]. The default value is true.</p>
                        </li>

                        <li>
                          <p><strong>sort\_by</strong> – Optional column that the data should be sorted by. Empty by default (i.e. no sorting is applied).</p>
                        </li>

                        <li>
                          <p><strong>sort\_order</strong> – String indicating how the returned values should be sorted - ascending or descending. If sort\_order is provided, sort\_by has to be provided. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>ascending</p>
                            </li>

                            <li>
                              <p>descending</p>
                            </li>
                          </ul>

                          <p>The default value is ‘ascending’.</p>
                        </li>
                      </ul>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A GeoJSON object (<span className="em">a dict</span>)</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.to_df"> <span className="sig-name descname"><span className="pre">to\_df</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="o"><span className="pre">\*\*</span></span><span className="n"><span className="pre">kwargs</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Converts the table data to a Pandas Data Frame.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">batch\_size (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>The number of records to retrieve at a time from the database</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A Pandas Data Frame containing the table data.</p>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.from_df"> <span className="em property"><span className="k"><span className="pre">classmethod</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">from\_df</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">df</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">db</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb" title="gpudb.GPUdb"><span className="pre">GPUdb</span></a></span></span>, <span className="em sig-param"><span className="n"><span className="pre">table\_name</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">str</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">column\_types</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">dict</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">clear\_table</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">bool</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">create\_table</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">bool</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">load\_data</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">bool</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">show\_progress</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">bool</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">False</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">batch\_size</span></span><span className="p"><span className="pre">:</span></span><span className="w"> </span><span className="n"><span className="pre">int</span></span><span className="w"> </span><span className="o"><span className="pre">=</span></span><span className="w"> </span><span className="default_value"><span className="pre">5000</span></span></span>, <span className="em sig-param"><span className="o"><span className="pre">\*\*</span></span><span className="n"><span className="pre">kwargs</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Load a Data Frame into a table; optionally dropping any existing table, creating it if it doesn’t exist, and loading data into it; and then returning a GPUdbTable reference to the table.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">df (<span className="em">pd.DataFrame</span>) –</div>

                    <div className="dd">
                      <p>The Pandas Data Frame to load into a table</p>
                    </div>

                    <div className="dt">db (<span className="em">GPUdb</span>) –</div>

                    <div className="dd">
                      <p>GPUdb instance</p>
                    </div>

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

                    <div className="dd">
                      <p>Name of the target Kinetica table for the Data Frame loading</p>
                    </div>

                    <div className="dt">column\_types (<span className="em">dict</span>) –</div>

                    <div className="dd">
                      <p>Optional Kinetica column properties to apply to the column type definitions inferred from the Data Frame; map of column name to a list of column properties for that column, excluding the inferred base type. For example:</p>

                      <div className="highlight-default notranslate">
                        ```
                        { "middle_name": [ 'char64', 'nullable' ], "state": [ 'char2', 'dict' ] }
                        ```
                      </div>
                    </div>

                    <div className="dt">clear\_table (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Whether to drop an existing table of the same name or not before creating this one.</p>
                    </div>

                    <div className="dt">create\_table (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Whether to create the table if it doesn’t exist or not.</p>
                    </div>

                    <div className="dt">load\_data (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Whether to load data into the target table or not.</p>
                    </div>

                    <div className="dt">show\_progress (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Whether to show progress of the operation on the console.</p>
                    </div>

                    <div className="dt">batch\_size (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>The number of records at a time to load into the target table.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <p>GPUdbException</p>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbTable –</div>

                    <div className="dd">
                      <p>a GPUdbTable instance created from the Data Frame passed in</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.type_as_df"> <span className="sig-name descname"><span className="pre">type\_as\_df</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Return table columns as a dataframe for inspection.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.insert_df"> <span className="sig-name descname"><span className="pre">insert\_df</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">df</span></span></span>, <span className="em sig-param"><span className="o"><span className="pre">\*\*</span></span><span className="n"><span className="pre">kwargs</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Insert into a GPUdbTable from a dataframe.</p>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.create_join_table"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">create\_join\_table</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">db</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">join\_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">table\_names</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\_names</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">expressions</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">\[]</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Creates a table that is the result of a SQL JOIN.</p>
              <p>For join details and examples see: <a className="reference external" href="/content/concepts/joins/">Joins</a>. For limitations, see <a className="reference external" href="/content/concepts/joins/#limitations-cautions">Join Limitations and Cautions</a>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the join table to be created, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>.</p>
                    </div>

                    <div className="dt">table\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>The list of table names composing the join, each in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>. Corresponds to a SQL statement FROM clause. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

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

                    <div className="dd">
                      <p>List of member table columns or column expressions to be included in the join. Columns can be prefixed with ‘table\_id.column\_name’, where ‘table\_id’ is the table name or alias. Columns can be aliased via the syntax ‘column\_name as alias’. Wild cards ‘\*’ can be used to include all columns across member tables or ‘table\_id.\*’ for all of a single table’s columns. Columns and column expressions composing the join must be uniquely named or aliased–therefore, the ‘\*’ wild card cannot be used if column names aren’t unique across all tables. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">expressions (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>An optional list of expressions to combine and filter the joined tables. Corresponds to a SQL statement WHERE clause. For details see: <a className="reference external" href="/content/concepts/expressions/">expressions</a>. The default value is an empty list ( \[] ). 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">join\_table\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_join\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the join as part of input parameter <span className="em">join\_table\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the join. If the schema is non-existent, it will be automatically created. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>max\_query\_dimensions</strong> – No longer used.</p>
                        </li>

                        <li>
                          <p><strong>strategy\_definition</strong> – The <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the join table specified in input parameter <span className="em">join\_table\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – View this projection is part of. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>no\_count</strong> – Return a count of 0 for the join table for logging and for <a className="reference internal" href="#gpudb.GPUdbTable.show_table" title="gpudb.GPUdbTable.show_table"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdbTable.show\_table()</span></code></a>; optimization needed for large overlapped equi-join stencils. The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Maximum number of records per joined-chunk for this table. Defaults to the gpudb.conf file chunk size.</p>
                        </li>

                        <li>
                          <p><strong>enable\_virtual\_chunking</strong> – Collect chunks with accumulated size less than chunk\_size into a single chunk. The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>max\_virtual\_chunk\_size</strong> – Maximum number of records per virtual-chunk. When set, enables virtual chunking. Defaults to chunk\_size if virtual chunking otherwise enabled.</p>
                        </li>

                        <li>
                          <p><strong>min\_virtual\_chunk\_size</strong> – Minimum number of records per virtual-chunk. When set, enables virtual chunking. Defaults to chunk\_size if virtual chunking otherwise enabled.</p>
                        </li>

                        <li>
                          <p><strong>enable\_sparse\_virtual\_chunking</strong> – Materialize virtual chunks with only non-deleted values. The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>enable\_equi\_join\_lazy\_result\_store</strong> – Allow using the lazy result store to cache computation of one side of a multichunk equi-join. Reduces computation but also reduces parallelism to the number of chunks on the other side of the equi-join.</p>
                        </li>

                        <li>
                          <p><strong>enable\_predicate\_equi\_join\_lazy\_result\_store</strong> – Allow using the lazy result store to cache computation of one side of a multichunk predicate-equi-join. Reduces computation but also reduces parallelism to the number of chunks on the other side of the equi-join.</p>
                        </li>

                        <li>
                          <p><strong>enable\_pk\_equi\_join</strong> – Use equi-join to do primary key joins rather than using primary key index.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.create_union"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">create\_union</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">db</span></span></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">table\_names</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">input\_column\_names</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">output\_column\_names</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Merges data from one or more tables with comparable data types into a new table.</p>
              <p>The following merges are supported:</p>
              <p>UNION (DISTINCT/ALL) - For data set union details and examples, see <a className="reference external" href="/content/concepts/unions/">Union</a>. For limitations, see <a className="reference external" href="/content/concepts/unions/#limitations-and-cautions">Union Limitations and Cautions</a>.</p>
              <p>INTERSECT (DISTINCT/ALL) - For data set intersection details and examples, see <a className="reference external" href="/content/concepts/intersect/">Intersect</a>. For limitations, see <a className="reference external" href="/content/concepts/intersect/#limitations">Intersect Limitations</a>.</p>
              <p>EXCEPT (DISTINCT/ALL) - For data set subtraction details and examples, see <a className="reference external" href="/content/concepts/except/">Except</a>. For limitations, see <a className="reference external" href="/content/concepts/except/#limitations">Except Limitations</a>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the table to be created, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>.</p>
                    </div>

                    <div className="dt">table\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>The list of table names to merge, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>. Must contain the names of one or more existing tables. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">input\_column\_names (<span className="em">list of lists of str</span>) –</div>

                    <div className="dd">
                      <p>The list of columns from each of the corresponding input tables. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">output\_column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>The list of names of the columns to be stored in the output table. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">table\_name</span>. If <span className="em">persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the projection as part of input parameter <span className="em">table\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of the schema for the output table. If the schema provided is non-existent, it will be automatically created. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>mode</strong> – The mode describes what rows of the tables being unioned will be retained. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>union\_all</strong> – Retains all rows from the specified tables.</p>
                            </li>

                            <li>
                              <p><strong>union</strong> – Retains all unique rows from the specified tables (synonym for <span className="em">union\_distinct</span>).</p>
                            </li>

                            <li>
                              <p><strong>union\_distinct</strong> – Retains all unique rows from the specified tables.</p>
                            </li>

                            <li>
                              <p><strong>except</strong> – Retains all unique rows from the first table that do not appear in the second table (only works on 2 tables).</p>
                            </li>

                            <li>
                              <p><strong>except\_all</strong> – Retains all rows(including duplicates) from the first table that do not appear in the second table (only works on 2 tables).</p>
                            </li>

                            <li>
                              <p><strong>intersect</strong> – Retains all unique rows that appear in both of the specified tables (only works on 2 tables).</p>
                            </li>

                            <li>
                              <p><strong>intersect\_all</strong> – Retains all rows(including duplicates) that appear in both of the specified tables (only works on 2 tables).</p>
                            </li>
                          </ul>

                          <p>The default value is ‘union\_all’.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Indicates the number of records per chunk to be used for this output table.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_column\_max\_memory</strong> – Indicates the target maximum data size for each column in a chunk to be used for this output table.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_max\_memory</strong> – Indicates the target maximum data size for all columns in a chunk to be used for this output table.</p>
                        </li>

                        <li>
                          <p><strong>create\_indexes</strong> – Comma-separated list of columns on which to create indexes on the output table. The columns specified must be present in input parameter <span className="em">output\_column\_names</span>.</p>
                        </li>

                        <li>
                          <p><strong>partition\_type</strong> – <a className="reference external" href="/content/concepts/tables/#partitioning">Partitioning</a> scheme to use for the output table. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>RANGE</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>INTERVAL</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>LIST</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>HASH</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>SERIES</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a>.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>partition\_keys</strong> – Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <span className="em">partition\_definitions</span>.</p>
                        </li>

                        <li>
                          <p><strong>partition\_definitions</strong> – Comma-separated list of partition definitions, whose format depends on the choice of <span className="em">partition\_type</span>. See <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>, or <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a> for example formats.</p>
                        </li>

                        <li>
                          <p><strong>is\_automatic\_partition</strong> – If <span className="em">true</span>, a new partition will be created for values which don’t fall into an existing partition. Currently only supported for <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitions</a>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the output table specified in input parameter <span className="em">table\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>persist</strong> – If <span className="em">true</span>, then the output table specified in input parameter <span className="em">table\_name</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the output table will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – ID of view of which this output table is a member. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>force\_replicated</strong> – If <span className="em">true</span>, then the output table specified in input parameter <span className="em">table\_name</span> will be replicated even if the source tables are not. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>strategy\_definition</strong> – The <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – The default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for this table’s columns.</p>
                        </li>

                        <li>
                          <p><strong>no\_count</strong> – Return a count of 0 for the union table response to avoid the cost of counting; optimization needed for many chunk virtual unions. The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_convex_hull"> <span className="sig-name descname"><span className="pre">aggregate\_convex\_hull</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">x\_column\_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">y\_column\_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">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates and returns the convex hull for the values in a table specified by input parameter <span className="em">table\_name</span>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column containing the x coordinates of the points for the operation being performed.</p>
                    </div>

                    <div className="dt">y\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the column containing the y coordinates of the points for the operation being performed.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">x\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>Array of x coordinates of the resulting convex set.</p>
                    </div>

                    <div className="dt">y\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>Array of y coordinates of the resulting convex set.</p>
                    </div>

                    <div className="dt">count (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>Count of the number of points in the convex set.</p>
                    </div>

                    <div className="dt">is\_valid (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates whether a valid convex hull could be computed for the input.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_group_by"> <span className="sig-name descname"><span className="pre">aggregate\_group\_by</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</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">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">get\_column\_major</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates unique combinations (groups) of values for the given columns in a given table or view and computes aggregates on each unique combination. This is somewhat analogous to an SQL-style SELECT…GROUP BY.</p>
              <p>For aggregation details and examples, see <a className="reference external" href="/content/concepts/aggregation/">Aggregation</a>. For limitations, see <a className="reference external" href="/content/concepts/aggregation/#limitations">Aggregation Limitations</a>.</p>
              <p>Any column(s) can be grouped on, and all column types except unrestricted-length strings may be used for computing applicable aggregates.</p>
              <p>The results can be paged via the input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> parameters. For example, to get 10 groups with the largest counts the inputs would be: limit=10, options={"{"}“sort\_order”:”descending”, “sort\_by”:”value”{"}"}.</p>
              <p>Input parameter <span className="em">options</span> can be used to customize behavior of this call e.g. filtering or sorting the results.</p>
              <p>To group by columns ‘x’ and ‘y’ and compute the number of objects within each group, use: column\_names=\[‘x’,’y’,’count(\*)’].</p>
              <p>To also compute the sum of ‘z’ over each group, use: column\_names=\[‘x’,’y’,’count(\*)’,’sum(z)’].</p>
              <p>Available <a className="reference external" href="/content/concepts/expressions/#aggregate-expressions">aggregation functions</a> are: count(\*), sum, min, max, avg, mean, stddev, stddev\_pop, stddev\_samp, var, var\_pop, var\_samp, arg\_min, arg\_max and count\_distinct.</p>
              <p>Available grouping functions are <a className="reference external" href="/content/concepts/rollup/">Rollup</a>, <a className="reference external" href="/content/concepts/cube/">Cube</a>, and <a className="reference external" href="/content/concepts/grouping_sets/">Grouping Sets</a></p>
              <p>This service also provides support for <a className="reference external" href="/content/concepts/pivot/">Pivot</a> operations.</p>
              <p>Filtering on aggregates is supported via expressions using <a className="reference external" href="/content/concepts/expressions/#aggregate-expressions">aggregation functions</a> supplied to <span className="em">having</span>.</p>
              <p>The response is returned as a dynamic schema. For details see: <a className="reference external" href="/content/api/concepts/#dynamic-schemas">dynamic schemas documentation</a>.</p>
              <p>If a <span className="em">result\_table</span> name is specified in the input parameter <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 names must adhere to <a className="reference external" href="/content/concepts/tables/#table">standard naming conventions</a>; column/aggregation expressions will need to be aliased. If the source table’s <a className="reference external" href="/content/concepts/tables/#shard-keys">shard key</a> is used as the grouping column(s) and all result records are selected (input parameter <span className="em">offset</span> is 0 and input parameter <span className="em">limit</span> is -9999), 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 when any of the values of input parameter <span className="em">column\_names</span> is an unrestricted-length string.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>List of one or more column names, expressions, and aggregate expressions. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>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.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>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 className="reference external" href="/content/config/#config-main-general">max\_get\_records\_size</a> parameter in the server configuration. Use output parameter <span className="em">has\_more\_records</span> to see if more records exist in the result to be fetched, and input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> to request subsequent pages of results. The default value is -9999.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>binary</strong> – Indicates that the returned records should be binary encoded.</p>
                        </li>

                        <li>
                          <p><strong>json</strong> – Indicates that the returned records should be JSON-encoded.</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em">result\_table</span>. If <span className="em">result\_table\_persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_result\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema as part of <span className="em">result\_table</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema which is to contain the table specified in <span className="em">result\_table</span>. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – Filter expression to apply to the table prior to computing the aggregate group by.</p>
                        </li>

                        <li>
                          <p><strong>pipelined\_expression\_evaluation</strong> – Evaluate the group-by during last JoinedSet filter plan step. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>having</strong> – Filter expression to apply to the aggregated results.</p>
                        </li>

                        <li>
                          <p><strong>sort\_order</strong> – \[DEPRECATED–use order\_by instead] String indicating how the returned values should be sorted - ascending or descending. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>ascending</strong> – Indicates that the returned values should be sorted in ascending order.</p>
                            </li>

                            <li>
                              <p><strong>descending</strong> – Indicates that the returned values should be sorted in descending order.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘ascending’.</p>
                        </li>

                        <li>
                          <p><strong>sort\_by</strong> – \[DEPRECATED–use order\_by instead] String determining how the results are sorted. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>key</strong> – Indicates that the returned values should be sorted by key, which corresponds to the grouping columns. If you have multiple grouping columns (and are sorting by key), it will first sort the first grouping column, then the second grouping column, etc.</p>
                            </li>

                            <li>
                              <p><strong>value</strong> – Indicates that the returned values should be sorted by value, which corresponds to the aggregates. If you have multiple aggregates (and are sorting by value), it will first sort by the first aggregate, then the second aggregate, etc.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘value’.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – 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 ‘’.</p>
                        </li>

                        <li>
                          <p><strong>strategy\_definition</strong> – The <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – The default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for the result table’s columns.</p>
                        </li>

                        <li>
                          <p><strong>result\_table</strong> – The name of a table used to store the results, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Column names (group-by and aggregate fields) need to be given aliases e.g. \[“FChar256 as fchar256”, “sum(FDouble) as sfd”]. If present, no results are returned in the response. This option is not available if one of the grouping attributes is an unrestricted string (i.e.; not charN) type.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_persist</strong> – If <span className="em">true</span>, then the result table specified in <span className="em">result\_table</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the result table will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_force\_replicated</strong> – Force the result table to be replicated (ignores any sharding). Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_generate\_pk</strong> – If <span className="em">true</span> then set a primary key for the result table. Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_generate\_soft\_pk</strong> – If <span className="em">true</span> then set a soft primary key for the result table. Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the table specified in <span className="em">result\_table</span>.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Indicates the number of records per chunk to be used for the result table. Must be used in combination with the <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_column\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>create\_indexes</strong> – Comma-separated list of columns on which to create indexes on the result table. Must be used in combination with the <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>partition\_type</strong> – <a className="reference external" href="/content/concepts/tables/#partitioning">Partitioning</a> scheme to use for the result table. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>RANGE</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>INTERVAL</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>LIST</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>HASH</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>SERIES</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a>.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>partition\_keys</strong> – Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <span className="em">partition\_definitions</span>.</p>
                        </li>

                        <li>
                          <p><strong>partition\_definitions</strong> – Comma-separated list of partition definitions, whose format depends on the choice of <span className="em">partition\_type</span>. See <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>, or <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a> for example formats.</p>
                        </li>

                        <li>
                          <p><strong>is\_automatic\_partition</strong> – If <span className="em">true</span>, a new partition will be created for values which don’t fall into an existing partition. Currently only supported for <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitions</a>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – ID of view of which the result table will be a member. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>pivot</strong> – Pivot column.</p>
                        </li>

                        <li>
                          <p><strong>pivot\_values</strong> – Comma-separated list of the values in the <span className="em">pivot</span> column. The list provided will become the column header prefixes in the output.</p>
                        </li>

                        <li>
                          <p><strong>grouping\_sets</strong> – Customize the grouping attribute sets to compute the aggregates. These sets can include ROLLUP or CUBE operators. The attribute sets should be enclosed in parentheses and can include composite attributes. All attributes specified in the grouping sets must present in the group-by attributes.</p>
                        </li>

                        <li>
                          <p><strong>rollup</strong> – This option is used to specify the multilevel aggregates.</p>
                        </li>

                        <li>
                          <p><strong>cube</strong> – This option is used to specify the multidimensional aggregates.</p>
                        </li>

                        <li>
                          <p><strong>shard\_key</strong> – Comma-separated list of the columns to be sharded on; e.g. ‘column1, column2’. The columns specified must be present in input parameter <span className="em">column\_names</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ‘’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>

                    <div className="dt">get\_column\_major (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates if the decoded records will be transposed to be column-major or returned as is (row-major). Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object if input options has “result\_table”; –</p>
                  <p>otherwise the response from the server, which is a dict containing –</p>
                  <p>the following entries–</p>

                  <div className="dl">
                    <div className="dt">response\_schema\_str (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Avro schema of output parameter <span className="em">binary\_encoded\_response</span> or output parameter <span className="em">json\_encoded\_response</span>.</p>
                    </div>

                    <div className="dt">total\_number\_of\_records (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Total/Filtered number of records. This may be an over-estimate if a limit was applied and there are additional records (i.e., when output parameter <span className="em">has\_more\_records</span> is true).</p>
                    </div>

                    <div className="dt">has\_more\_records (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Too many records. Returned a partial set.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>qualified\_result\_table\_name</strong> – The fully qualified name of the table (i.e. including the schema) used to store the results.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">records (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>

                    <div className="dt">data (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_histogram"> <span className="sig-name descname"><span className="pre">aggregate\_histogram</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">start</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">end</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">interval</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Performs a histogram calculation given a table, a column, and an interval function. The input parameter <span className="em">interval</span> is used to produce bins of that size and the result, computed over the records falling within each bin, is returned. For each bin, the start value is inclusive, but the end value is exclusive–except for the very last bin for which the end value is also inclusive. The value returned for each bin is the number of records in it, except when a column name is provided as a <span className="em">value\_column</span>. In this latter case the sum of the values corresponding to the <span className="em">value\_column</span> is used as the result instead. The total number of bins requested cannot exceed 10,000.</p>
              <p>NOTE: The Kinetica instance being accessed must be running a CUDA (GPU-based) build to service a request that specifies a <span className="em">value\_column</span>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of a column or an expression of one or more column names over which the histogram will be calculated.</p>
                    </div>

                    <div className="dt">start (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Lower end value of the histogram interval, inclusive.</p>
                    </div>

                    <div className="dt">end (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Upper end value of the histogram interval, inclusive.</p>
                    </div>

                    <div className="dt">interval (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The size of each bin within the start and end parameters.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>value\_column</strong> – The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).</p>
                        </li>

                        <li>
                          <p><strong>start</strong> – The start parameter for char types.</p>
                        </li>

                        <li>
                          <p><strong>end</strong> – The end parameter for char types.</p>
                        </li>

                        <li>
                          <p><strong>interval</strong> – The interval parameter for char types.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">counts (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>The array of calculated values that represents the histogram data points.</p>
                    </div>

                    <div className="dt">start (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of input parameter <span className="em">start</span>.</p>
                    </div>

                    <div className="dt">end (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of input parameter <span className="em">end</span>.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_k_means"> <span className="sig-name descname"><span className="pre">aggregate\_k\_means</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</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">k</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">tolerance</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>This endpoint runs the k-means algorithm - a heuristic algorithm that attempts to do k-means clustering. An ideal k-means clustering algorithm selects k points such that the sum of the mean squared distances of each member of the set to the nearest of the k points is minimized. The k-means algorithm however does not necessarily produce such an ideal cluster. It begins with a randomly selected set of k points and then refines the location of the points iteratively and settles to a local minimum. Various parameters and options are provided to control the heuristic search.</p>
              <p>NOTE: The Kinetica instance being accessed must be running a CUDA (GPU-based) build to service this request.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>List of column names on which the operation would be performed. If n columns are provided then each of the k result points will have n dimensions corresponding to the n columns. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">k (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>The number of mean points to be determined by the algorithm.</p>
                    </div>

                    <div className="dt">tolerance (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Stop iterating when the distances between successive points is less than the given tolerance.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>whiten</strong> – When set to 1 each of the columns is first normalized by its stdv - default is not to whiten.</p>
                        </li>

                        <li>
                          <p><strong>max\_iters</strong> – Number of times to try to hit the tolerance limit before giving up - default is 10.</p>
                        </li>

                        <li>
                          <p><strong>num\_tries</strong> – Number of times to run the k-means algorithm with a different randomly selected starting points - helps avoid local minimum. Default is 1.</p>
                        </li>

                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em">result\_table</span>. If <span className="em">result\_table\_persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_result\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table</strong> – The name of a table used to store the results, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. If this option is specified, the results are not returned in the response.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_persist</strong> – If <span className="em">true</span>, then the result table specified in <span className="em">result\_table</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the result table will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the table specified in <span className="em">result\_table</span>.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object if input options has “result\_table”; –</p>
                  <p>otherwise the response from the server, which is a dict containing –</p>
                  <p>the following entries–</p>

                  <div className="dl">
                    <div className="dt">means (<span className="em">list of lists of floats</span>) –</div>

                    <div className="dd">
                      <p>The k-mean values found.</p>
                    </div>

                    <div className="dt">counts (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>The number of elements in the cluster closest the corresponding k-means values.</p>
                    </div>

                    <div className="dt">rms\_dists (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>The root mean squared distance of the elements in the cluster for each of the k-means values.</p>
                    </div>

                    <div className="dt">count (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>The total count of all the clusters - will be the size of the input table.</p>
                    </div>

                    <div className="dt">rms\_dist (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The sum of all the rms\_dists - the value the k-means algorithm is attempting to minimize.</p>
                    </div>

                    <div className="dt">tolerance (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The distance between the last two iterations of the algorithm before it quit.</p>
                    </div>

                    <div className="dt">num\_iters (<span className="em">int</span>) –</div>

                    <div className="dd">
                      <p>The number of iterations the algorithm executed before it quit.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>qualified\_result\_table\_name</strong> – The fully qualified name of the result table (i.e. including the schema) used to store the results.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_min_max"> <span className="sig-name descname"><span className="pre">aggregate\_min\_max</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates and returns the minimum and maximum values of a particular column in a table.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of a column or an expression of one or more column on which the min-max will be calculated.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl">
                    <div className="dt">min (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Minimum value of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

                    <div className="dt">max (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Maximum value of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>min\_string</strong> – The minimum value of input parameter <span className="em">column\_name</span>, stored as a byte vector.</p>
                        </li>

                        <li>
                          <p><strong>max\_string</strong> – The maximum value of input parameter <span className="em">column\_name</span>, stored as a byte vector.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_min_max_geometry"> <span className="sig-name descname"><span className="pre">aggregate\_min\_max\_geometry</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates and returns the minimum and maximum x- and y-coordinates of a particular geospatial geometry column in a table.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of a geospatial geometry column on which the min-max will be calculated.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">min\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Minimum x-coordinate value of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

                    <div className="dt">max\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Maximum x-coordinate value of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

                    <div className="dt">min\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Minimum y-coordinate value of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

                    <div className="dt">max\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Maximum y-coordinate value of the input parameter <span className="em">column\_name</span>.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_statistics"> <span className="sig-name descname"><span className="pre">aggregate\_statistics</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">stats</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates the requested statistics of the given column(s) in a given table.</p>
              <p>The available statistics are: <span className="em">count</span> (number of total objects), <span className="em">mean</span>, <span className="em">stdv</span> (standard deviation), <span className="em">variance</span>, <span className="em">skew</span>, <span className="em">kurtosis</span>, <span className="em">sum</span>, <span className="em">min</span>, <span className="em">max</span>, <span className="em">weighted\_average</span>, <span className="em">cardinality</span> (unique count), <span className="em">estimated\_cardinality</span>, <span className="em">percentile</span>, and <span className="em">percentile\_rank</span>.</p>
              <p>Estimated cardinality is calculated by using the hyperloglog approximation technique.</p>
              <p>Percentiles and percentile ranks are approximate and are calculated using the t-digest algorithm. They must include the desired <span className="em">percentile</span>/<span className="em">percentile\_rank</span>. To compute multiple percentiles each value must be specified separately (i.e. ‘percentile(75.0),percentile(99.0),percentile\_rank(1234.56),percentile\_rank(-5)’).</p>
              <p>A second, comma-separated value can be added to the <span className="em">percentile</span> statistic to calculate percentile resolution, e.g., a 50th percentile with 200 resolution would be ‘percentile(50,200)’.</p>
              <p>The weighted average statistic requires a weight column to be specified in <span className="em">weight\_column\_name</span>. The weighted average is then defined as the sum of the products of input parameter <span className="em">column\_name</span> times the <span className="em">weight\_column\_name</span> values divided by the sum of the <span className="em">weight\_column\_name</span> values.</p>
              <p>Additional columns can be used in the calculation of statistics via <span className="em">additional\_column\_names</span>. Values in these columns will be included in the overall aggregate calculation–individual aggregates will not be calculated per additional column. For instance, requesting the <span className="em">count</span> and <span className="em">mean</span> of input parameter <span className="em">column\_name</span> x and <span className="em">additional\_column\_names</span> y and z, where x holds the numbers 1-10, y holds 11-20, and z holds 21-30, would return the total number of x, y, and z values (30), and the single average value across all x, y, and z values (15.5).</p>
              <p>The response includes a list of key/value pairs of each statistic requested and its corresponding value.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the primary column for which the statistics are to be calculated.</p>
                    </div>

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

                    <div className="dd">
                      <p>Comma separated list of the statistics to calculate, e.g. “sum,mean”. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>count</strong> – Number of objects (independent of the given column(s)).</p>
                        </li>

                        <li>
                          <p><strong>mean</strong> – Arithmetic mean (average), equivalent to sum/count.</p>
                        </li>

                        <li>
                          <p><strong>stdv</strong> – Sample standard deviation (denominator is count-1).</p>
                        </li>

                        <li>
                          <p><strong>variance</strong> – Unbiased sample variance (denominator is count-1).</p>
                        </li>

                        <li>
                          <p><strong>skew</strong> – Skewness (third standardized moment).</p>
                        </li>

                        <li>
                          <p><strong>kurtosis</strong> – Kurtosis (fourth standardized moment).</p>
                        </li>

                        <li>
                          <p><strong>sum</strong> – Sum of all values in the column(s).</p>
                        </li>

                        <li>
                          <p><strong>min</strong> – Minimum value of the column(s).</p>
                        </li>

                        <li>
                          <p><strong>max</strong> – Maximum value of the column(s).</p>
                        </li>

                        <li>
                          <p><strong>weighted\_average</strong> – Weighted arithmetic mean (using the option <span className="em">weight\_column\_name</span> as the weighting column).</p>
                        </li>

                        <li>
                          <p><strong>cardinality</strong> – Number of unique values in the column(s).</p>
                        </li>

                        <li>
                          <p><strong>estimated\_cardinality</strong> – Estimate (via hyperloglog technique) of the number of unique values in the column(s).</p>
                        </li>

                        <li>
                          <p><strong>percentile</strong> – Estimate (via t-digest) of the given percentile of the column(s) (percentile(50.0) will be an approximation of the median). Add a second, comma-separated value to calculate percentile resolution, e.g., ‘percentile(75,150)’.</p>
                        </li>

                        <li>
                          <p><strong>percentile\_rank</strong> – Estimate (via t-digest) of the percentile rank of the given value in the column(s) (if the given value is the median of the column(s), percentile\_rank(\<median>) will return approximately 50.0).</p>
                        </li>
                      </ul>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>additional\_column\_names</strong> – A list of comma separated column names over which statistics can be accumulated along with the primary column. All columns listed and input parameter <span className="em">column\_name</span> must be of the same type. Must not include the column specified in input parameter <span className="em">column\_name</span> and no column can be listed twice.</p>
                        </li>

                        <li>
                          <p><strong>weight\_column\_name</strong> – Name of column used as weighting attribute for the weighted average statistic.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">stats (<span className="em">dict of str to floats</span>) –</div>

                    <div className="dd">
                      <p>(statistic name, double value) pairs of the requested statistics, including the total count by default.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_statistics_by_range"> <span className="sig-name descname"><span className="pre">aggregate\_statistics\_by\_range</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">select\_expression</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">column\_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">value\_column\_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">stats</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">start</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">end</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">interval</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Divides the given set into bins and calculates statistics of the values of a value-column in each bin. The bins are based on the values of a given binning-column. The statistics that may be requested are mean, stdv (standard deviation), variance, skew, kurtosis, sum, min, max, first, last and weighted average. In addition to the requested statistics the count of total samples in each bin is returned. This counts vector is just the histogram of the column used to divide the set members into bins. The weighted average statistic requires a weight column to be specified in <span className="em">weight\_column\_name</span>. The weighted average is then defined as the sum of the products of the value column times the weight column divided by the sum of the weight column.</p>
              <p>There are two methods for binning the set members. In the first, which can be used for numeric valued binning-columns, a min, max and interval are specified. The number of bins, nbins, is the integer upper bound of (max-min)/interval. Values that fall in the range \[min+n\*interval,min+(n+1)\*interval) are placed in the nth bin where n ranges from 0..nbin-2. The final bin is \[min+(nbin-1)\*interval,max]. In the second method, <span className="em">bin\_values</span> specifies a list of binning column values. Binning-columns whose value matches the nth member of the <span className="em">bin\_values</span> list are placed in the nth bin. When a list is provided, the binning-column must be of type string or int.</p>
              <p>NOTE: The Kinetica instance being accessed must be running a CUDA (GPU-based) build to service this request.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">select\_expression (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>For a non-empty expression statistics are calculated for those records for which the expression is true. The default value is ‘’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Name of the binning-column used to divide the set samples into bins.</p>
                    </div>

                    <div className="dt">value\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the value-column for which statistics are to be computed.</p>
                    </div>

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

                    <div className="dd">
                      <p>A string of comma separated list of the statistics to calculate, e.g. ‘sum,mean’. Available statistics: mean, stdv (standard deviation), variance, skew, kurtosis, sum.</p>
                    </div>

                    <div className="dt">start (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The lower bound of the binning-column.</p>
                    </div>

                    <div className="dt">end (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The upper bound of the binning-column.</p>
                    </div>

                    <div className="dt">interval (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The interval of a bin. Set members fall into bin i if the binning-column falls in the range \[start+interval\*i, start+interval\*(i+1)).</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>additional\_column\_names</strong> – A list of comma separated value-column names over which statistics can be accumulated along with the primary value\_column.</p>
                        </li>

                        <li>
                          <p><strong>bin\_values</strong> – A list of comma separated binning-column values. Values that match the nth bin\_values value are placed in the nth bin.</p>
                        </li>

                        <li>
                          <p><strong>weight\_column\_name</strong> – Name of the column used as weighting column for the weighted\_average statistic.</p>
                        </li>

                        <li>
                          <p><strong>order\_column\_name</strong> – Name of the column used for candlestick charting techniques.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">stats (<span className="em">dict of str to lists of floats</span>) –</div>

                    <div className="dd">
                      <p>A map with a key for each statistic in the stats input parameter having a value that is a vector of the corresponding value-column bin statistics. In a addition the key count has a value that is a histogram of the binning-column.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_unique"> <span className="sig-name descname"><span className="pre">aggregate\_unique</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">offset</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">limit</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">-9999</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">get\_column\_major</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Returns all the unique values from a particular column (specified by input parameter <span className="em">column\_name</span>) of a particular table or view (specified by input parameter <span className="em">table\_name</span>). If input parameter <span className="em">column\_name</span> is a numeric column, the values will be in output parameter <span className="em">binary\_encoded\_response</span>. Otherwise if input parameter <span className="em">column\_name</span> is a string column, the values will be in output parameter <span className="em">json\_encoded\_response</span>. The results can be paged via input parameter <span className="em">offset</span> and input parameter <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 className="reference external" href="/content/api/concepts/#dynamic-schemas">dynamic schemas documentation</a>.</p>
              <p>If a <span className="em">result\_table</span> name is specified in the input parameter <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 className="reference external" href="/content/concepts/tables/#table">standard naming conventions</a>; any column expression will need to be aliased. If the source table’s <a className="reference external" href="/content/concepts/tables/#shard-keys">shard key</a> is used as the input parameter <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 input parameter <span className="em">column\_name</span> is an unrestricted-length string.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column or an expression containing one or more column names on which the unique function would be applied.</p>
                    </div>

                    <div className="dt">offset (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>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.</p>
                    </div>

                    <div className="dt">limit (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>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 className="reference external" href="/content/config/#config-main-general">max\_get\_records\_size</a> parameter in the server configuration. Use output parameter <span className="em">has\_more\_records</span> to see if more records exist in the result to be fetched, and input parameter <span className="em">offset</span> and input parameter <span className="em">limit</span> to request subsequent pages of results. The default value is -9999.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>binary</strong> – Indicates that the returned records should be binary encoded.</p>
                        </li>

                        <li>
                          <p><strong>json</strong> – Indicates that the returned records should be JSON-encoded.</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em">result\_table</span>. If <span className="em">result\_table\_persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_result\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema as part of <span className="em">result\_table</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema which is to contain the table specified in <span className="em">result\_table</span>. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – Filter expression to apply to the table.</p>
                        </li>

                        <li>
                          <p><strong>sort\_order</strong> – String indicating how the returned values should be sorted. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>ascending</p>
                            </li>

                            <li>
                              <p>descending</p>
                            </li>
                          </ul>

                          <p>The default value is ‘ascending’.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – 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 ‘’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table</strong> – The name of the table used to store the results, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. If present, no results are returned in the response. Not available if input parameter <span className="em">column\_name</span> is an unrestricted-length string.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_persist</strong> – If <span className="em">true</span>, then the result table specified in <span className="em">result\_table</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the result table will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_force\_replicated</strong> – Force the result table to be replicated (ignores any sharding). Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_generate\_pk</strong> – If <span className="em">true</span> then set a primary key for the result table. Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the table specified in <span className="em">result\_table</span>.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Indicates the number of records per chunk to be used for the result table. Must be used in combination with the <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_column\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – The default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for the result table’s columns.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – ID of view of which the result table will be a member. The default value is ‘’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>

                    <div className="dt">get\_column\_major (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates if the decoded records will be transposed to be column-major or returned as is (row-major). Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object if input options has “result\_table”; –</p>
                  <p>otherwise the response from the server, which is a dict containing –</p>
                  <p>the following entries–</p>

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

                    <div className="dd">
                      <p>The same table name as was passed in the parameter list.</p>
                    </div>

                    <div className="dt">response\_schema\_str (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Avro schema of output parameter <span className="em">binary\_encoded\_response</span> or output parameter <span className="em">json\_encoded\_response</span>.</p>
                    </div>

                    <div className="dt">has\_more\_records (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Too many records. Returned a partial set.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>qualified\_result\_table\_name</strong> – The fully qualified name of the table (i.e. including the schema) used to store the results.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">records (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>

                    <div className="dt">data (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.aggregate_unpivot"> <span className="sig-name descname"><span className="pre">aggregate\_unpivot</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</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">variable\_column\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">value\_column\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">pivoted\_columns</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">encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">force\_primitive\_return\_types</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">get\_column\_major</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">True</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Rotate the column values into rows values.</p>
              <p>For unpivot details and examples, see <a className="reference external" href="/content/concepts/unpivot/">Unpivot</a>. For limitations, see <a className="reference external" href="/content/concepts/unpivot/#limitations">Unpivot Limitations</a>.</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: <a className="reference external" href="/content/api/concepts/#dynamic-schemas">dynamic schemas documentation</a>.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>List of column names or expressions. A wildcard ‘\*’ can be used to include all the non-pivoted columns from the source table. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">variable\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Specifies the variable/parameter column name. The default value is ‘’.</p>
                    </div>

                    <div className="dt">value\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Specifies the value column name. The default value is ‘’.</p>
                    </div>

                    <div className="dt">pivoted\_columns (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <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. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

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

                    <div className="dd">
                      <p>Specifies the encoding for returned records. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>binary</strong> – Indicates that the returned records should be binary encoded.</p>
                        </li>

                        <li>
                          <p><strong>json</strong> – Indicates that the returned records should be JSON-encoded.</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em">result\_table</span>. If <span className="em">result\_table\_persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_result\_table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema as part of <span className="em">result\_table</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema which is to contain the table specified in <span className="em">result\_table</span>. If the schema is non-existent, it will be automatically created.</p>
                        </li>

                        <li>
                          <p><strong>result\_table</strong> – The name of a table used to store the results, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. If present, no results are returned in the response.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_persist</strong> – If <span className="em">true</span>, then the result table specified in <span className="em">result\_table</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the result table will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – Filter expression to apply to the table prior to unpivot processing.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – Comma-separated list of the columns to be sorted by; e.g. ‘timestamp asc, x desc’. The columns specified must be present in input table. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Indicates the number of records per chunk to be used for the result table. Must be used in combination with the <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_column\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_max\_memory</strong> – 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 <span className="em">result\_table</span> option.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – The default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for the result table’s columns.</p>
                        </li>

                        <li>
                          <p><strong>limit</strong> – The number of records to keep. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the table specified in <span className="em">result\_table</span>.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – View this result table is part of. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>create\_indexes</strong> – Comma-separated list of columns on which to create indexes on the table specified in <span className="em">result\_table</span>. The columns specified must be present in output column names. If any alias is given for any column name, the alias must be used, rather than the original column name.</p>
                        </li>

                        <li>
                          <p><strong>result\_table\_force\_replicated</strong> – Force the result table to be replicated (ignores any sharding). Must be used in combination with the <span className="em">result\_table</span> option. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">force\_primitive\_return\_types (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>If <cite>True</cite>, then <cite>OrderedDict</cite> objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python <cite>datetime</cite> structs, used for datetime type columns would have their values returned as strings. If <cite>False</cite>, then <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning <cite>OrderedDicts</cite>, incur a speed penalty, and it is strongly recommended to use the <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> object option instead. If <cite>True</cite>, but none of the returned columns require a conversion, then the original <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects will be returned. Default value is True.</p>
                    </div>

                    <div className="dt">get\_column\_major (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates if the decoded records will be transposed to be column-major or returned as is (row-major). Default value is True.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object if input options has “result\_table”; –</p>
                  <p>otherwise the response from the server, which is a dict containing –</p>
                  <p>the following entries–</p>

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

                    <div className="dd">
                      <p>Typically shows the result-table name if provided in the request (Ignore otherwise).</p>
                    </div>

                    <div className="dt">response\_schema\_str (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Avro schema of output parameter <span className="em">binary\_encoded\_response</span> or output parameter <span className="em">json\_encoded\_response</span>.</p>
                    </div>

                    <div className="dt">total\_number\_of\_records (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Total/Filtered number of records.</p>
                    </div>

                    <div className="dt">has\_more\_records (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Too many records. Returned a partial set.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>qualified\_result\_table\_name</strong> – The fully qualified name of the table (i.e. including the schema) used to store the results.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

                    <div className="dt">records (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>

                    <div className="dt">data (list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code>) –</div>

                    <div className="dd">
                      <p>A list of <code className="xref py py-class docutils literal notranslate"><span className="pre">Record</span></code> objects which contain the decoded records.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.alter_table"> <span className="sig-name descname"><span className="pre">alter\_table</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">action</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">value</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Apply various modifications to a table or view. The available modifications include the following:</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>External tables cannot be modified except for their refresh method.</p>
              <p>Create or delete a <a className="reference external" href="/content/concepts/indexes/#column-index">column</a>, <a className="reference external" href="/content/concepts/indexes/#low-cardinality-index">low-cardinality index</a>, <a className="reference external" href="/content/concepts/indexes/#chunk-skip-index">chunk skip</a>, <a className="reference external" href="/content/concepts/indexes/#geospatial-index">geospatial</a>, <a className="reference external" href="/content/concepts/indexes/#cagra-index">CAGRA</a>, or <a className="reference external" href="/content/concepts/indexes/#hnsw-index">HNSW</a> index. This can speed up certain operations when using expressions containing equality or relational operators on indexed columns. This only applies to tables.</p>
              <p>Create or delete a <a className="reference external" href="/content/concepts/tables/#foreign-key">foreign key</a> on a particular column.</p>
              <p>Manage a <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range-partitioned</a> or a <a className="reference external" href="/content/concepts/tables/#partitioning-by-list-manual">manual list-partitioned</a> table’s partitions.</p>
              <p>Set (or reset) the <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> of a table or view.</p>
              <p>Refresh and manage the refresh mode of a <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a> or an <a className="reference external" href="/content/concepts/external_tables/">external table</a>.</p>
              <p>Set the <a className="reference external" href="/content/concepts/ttl/">time-to-live (TTL)</a>. This can be applied to tables or views.</p>
              <p>Set the global access mode (i.e. locking) for a table. This setting trumps any role-based access controls that may be in place; e.g., a user with write access to a table marked read-only will not be able to insert records into it. The mode can be set to read-only, write-only, read/write, and no access.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">action (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Modification operation to be applied. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>create\_index</strong> – Creates a <a className="reference external" href="/content/concepts/indexes/#column-index">column (attribute) index</a>, <a className="reference external" href="/content/concepts/indexes/#low-cardinality-index">low-cardinality index</a>, <a className="reference external" href="/content/concepts/indexes/#chunk-skip-index">chunk skip index</a>, <a className="reference external" href="/content/concepts/indexes/#geospatial-index">geospatial index</a>, <a className="reference external" href="/content/concepts/indexes/#cagra-index">CAGRA index</a>, or <a className="reference external" href="/content/concepts/indexes/#hnsw-index">HNSW index</a> (depending on the specified <span className="em">index\_type</span>), on the column name specified in input parameter <span className="em">value</span>. If this column already has the specified index, an error will be returned.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_index</strong> – Refreshes an index identified by <span className="em">index\_type</span>, on the column name specified in input parameter <span className="em">value</span>. Currently applicable only to CAGRA indices.</p>
                        </li>

                        <li>
                          <p><strong>delete\_index</strong> – Deletes a <a className="reference external" href="/content/concepts/indexes/#column-index">column (attribute) index</a>, <a className="reference external" href="/content/concepts/indexes/#low-cardinality-index">low-cardinality index</a>, <a className="reference external" href="/content/concepts/indexes/#chunk-skip-index">chunk skip index</a>, <a className="reference external" href="/content/concepts/indexes/#geospatial-index">geospatial index</a>, <a className="reference external" href="/content/concepts/indexes/#cagra-index">CAGRA index</a>, or <a className="reference external" href="/content/concepts/indexes/#hnsw-index">HNSW index</a> (depending on the specified <span className="em">index\_type</span>), on the column name specified in input parameter <span className="em">value</span>. If this column does not have the specified index, an error will be returned.</p>
                        </li>

                        <li>
                          <p><strong>move\_to\_collection</strong> – \[DEPRECATED–please use <span className="em">move\_to\_schema</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Moves a table or view into a schema named input parameter <span className="em">value</span>. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>

                        <li>
                          <p><strong>move\_to\_schema</strong> – Moves a table or view into a schema named input parameter <span className="em">value</span>. If the schema provided is nonexistent, an error will be thrown. If input parameter <span className="em">value</span> is empty, then the table or view will be placed in the user’s default schema.</p>
                        </li>

                        <li>
                          <p><strong>protected</strong> – No longer used. Previously set whether the given input parameter <span className="em">table\_name</span> should be protected or not. The input parameter <span className="em">value</span> would have been either ‘true’ or ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>rename\_table</strong> – Renames a table or view to input parameter <span className="em">value</span>. Has the same naming restrictions as <a className="reference external" href="/content/concepts/tables/">tables</a>.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">time-to-live</a> in minutes of the table or view specified in input parameter <span className="em">table\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>add\_comment</strong> – Adds the comment specified in input parameter <span className="em">value</span> to the table specified in input parameter <span className="em">table\_name</span>. Use <span className="em">column\_name</span> to set the comment for a column.</p>
                        </li>

                        <li>
                          <p><strong>add\_column</strong> – Adds the column specified in input parameter <span className="em">value</span> to the table specified in input parameter <span className="em">table\_name</span>. Use <span className="em">column\_type</span> and <span className="em">column\_properties</span> in input parameter <span className="em">options</span> to set the column’s type and properties, respectively.</p>
                        </li>

                        <li>
                          <p><strong>change\_column</strong> – Changes type and properties of the column specified in input parameter <span className="em">value</span>. Use <span className="em">column\_type</span> and <span className="em">column\_properties</span> in input parameter <span className="em">options</span> to set the column’s type and properties, respectively. Note that primary key and/or shard key columns cannot be changed. All unchanging column properties must be listed for the change to take place, e.g., to add dictionary encoding to an existing ‘char4’ column, both ‘char4’ and ‘dict’ must be specified in the input parameter <span className="em">options</span> map.</p>
                        </li>

                        <li>
                          <p><strong>delete\_column</strong> – Deletes the column specified in input parameter <span className="em">value</span> from the table specified in input parameter <span className="em">table\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>set\_default</strong> – Sets or replaces the default value expression for the column specified in input parameter <span className="em">value</span>. The new default is taken from <span className="em">add\_column\_expression</span>. Existing properties on the column are preserved.</p>
                        </li>

                        <li>
                          <p><strong>delete\_default</strong> – Removes the default value expression from the column specified in input parameter <span className="em">value</span>. Other column properties are preserved.</p>
                        </li>

                        <li>
                          <p><strong>create\_foreign\_key</strong> – Creates a <a className="reference external" href="/content/concepts/tables/#foreign-key">foreign key</a> specified in input parameter <span className="em">value</span> using the format ‘(source\_column\_name \[, …]) references target\_table\_name(primary\_key\_column\_name \[, …]) \[as foreign\_key\_name]’.</p>
                        </li>

                        <li>
                          <p><strong>delete\_foreign\_key</strong> – Deletes a <a className="reference external" href="/content/concepts/tables/#foreign-key">foreign key</a>. The input parameter <span className="em">value</span> should be the foreign\_key\_name specified when creating the key or the complete string used to define it.</p>
                        </li>

                        <li>
                          <p><strong>add\_partition</strong> – Adds the partition specified in input parameter <span className="em">value</span>, to either a <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range-partitioned</a> or <a className="reference external" href="/content/concepts/tables/#partitioning-by-list-manual">manual list-partitioned</a> table.</p>
                        </li>

                        <li>
                          <p><strong>remove\_partition</strong> – Removes the partition specified in input parameter <span className="em">value</span> (and relocates all of its data to the default partition) from either a <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range-partitioned</a> or <a className="reference external" href="/content/concepts/tables/#partitioning-by-list-manual">manual list-partitioned</a> table.</p>
                        </li>

                        <li>
                          <p><strong>delete\_partition</strong> – Deletes the partition specified in input parameter <span className="em">value</span> (and all of its data) from either a <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range-partitioned</a> or <a className="reference external" href="/content/concepts/tables/#partitioning-by-list-manual">manual list-partitioned</a> table.</p>
                        </li>

                        <li>
                          <p><strong>set\_global\_access\_mode</strong> – Sets the global access mode (i.e. locking) for the table specified in input parameter <span className="em">table\_name</span>. Specify the access mode in input parameter <span className="em">value</span>. Valid modes are ‘no\_access’, ‘read\_only’, ‘write\_only’ and ‘read\_write’.</p>
                        </li>

                        <li>
                          <p><strong>refresh</strong> – For a <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a>, replays all the table creation commands required to create the view. For an <a className="reference external" href="/content/concepts/external_tables/">external table</a>, reloads all data in the table from its associated source files or <a className="reference external" href="/content/concepts/data_sources/">data source</a>.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_method</strong> – For a <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a>, sets the method by which the view is refreshed to the method specified in input parameter <span className="em">value</span> - one of ‘manual’, ‘periodic’, or ‘on\_change’. For an <a className="reference external" href="/content/concepts/external_tables/">external table</a>, sets the method by which the table is refreshed to the method specified in input parameter <span className="em">value</span> - either ‘manual’ or ‘on\_start’.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_start\_time</strong> – Sets the time to start periodic refreshes of this <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a> to the datetime string specified in input parameter <span className="em">value</span> with format ‘YYYY-MM-DD HH:MM:SS’. Subsequent refreshes occur at the specified time + N \* the refresh period.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_stop\_time</strong> – Sets the time to stop periodic refreshes of this <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a> to the datetime string specified in input parameter <span className="em">value</span> with format ‘YYYY-MM-DD HH:MM:SS’.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_period</strong> – Sets the time interval in seconds at which to refresh this <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a> to the value specified in input parameter <span className="em">value</span>. Also, sets the refresh method to periodic if not already set.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_span</strong> – Sets the future time-offset(in seconds) for the view refresh to stop.</p>
                        </li>

                        <li>
                          <p><strong>set\_refresh\_execute\_as</strong> – Sets the user name to refresh this <a className="reference external" href="/content/concepts/materialized_views/">materialized view</a> to the value specified in input parameter <span className="em">value</span>.</p>
                        </li>

                        <li>
                          <p><strong>remove\_text\_search\_attributes</strong> – Removes <a className="reference external" href="/content/concepts/full_text_search/">text search</a> attribute from all columns.</p>
                        </li>

                        <li>
                          <p><strong>remove\_shard\_keys</strong> – Removes the shard key property from all columns, so that the table will be considered randomly sharded. The data is not moved. The input parameter <span className="em">value</span> is ignored.</p>
                        </li>

                        <li>
                          <p><strong>set\_strategy\_definition</strong> – Sets the <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns to the one specified in input parameter <span className="em">value</span>, replacing the existing tier strategy in its entirety.</p>
                        </li>

                        <li>
                          <p><strong>cancel\_datasource\_subscription</strong> – Permanently unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure / GCS.</p>
                        </li>

                        <li>
                          <p><strong>drop\_datasource\_subscription</strong> – Permanently delete a cancelled data source subscription.</p>
                        </li>

                        <li>
                          <p><strong>pause\_datasource\_subscription</strong> – Temporarily unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure / GCS.</p>
                        </li>

                        <li>
                          <p><strong>resume\_datasource\_subscription</strong> – Resubscribe to a paused data source subscription. The data source can be Kafka / S3 / Azure / GCS.</p>
                        </li>

                        <li>
                          <p><strong>change\_owner</strong> – Change the owner resource group of the table.</p>
                        </li>

                        <li>
                          <p><strong>set\_load\_vectors\_policy</strong> – Set startup data loading scheme for the table; see description of ‘load\_vectors\_policy’ in <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_table" title="gpudb.GPUdb.create_table"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_table()</span></code></a> for possible values for input parameter <span className="em">value</span>.</p>
                        </li>

                        <li>
                          <p><strong>set\_build\_pk\_index\_policy</strong> – Set startup primary key generation scheme for the table; see description of ‘build\_pk\_index\_policy’ in <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_table" title="gpudb.GPUdb.create_table"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_table()</span></code></a> for possible values for input parameter <span className="em">value</span>.</p>
                        </li>

                        <li>
                          <p><strong>set\_build\_materialized\_view\_policy</strong> – Set startup rebuilding scheme for the materialized view; see description of ‘build\_materialized\_view\_policy’ in <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_materialized_view" title="gpudb.GPUdb.create_materialized_view"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_materialized\_view()</span></code></a> for possible values for input parameter <span className="em">value</span>.</p>
                        </li>
                      </ul>
                    </div>

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

                    <div className="dd">
                      <p>The value of the modification, depending on input parameter <span className="em">action</span>. For example, if input parameter <span className="em">action</span> is <span className="em">add\_column</span>, this would be the column name; while the column’s definition would be covered by the <span className="em">column\_type</span>, <span className="em">column\_properties</span>, <span className="em">column\_default\_value</span>, and <span className="em">add\_column\_expression</span> in input parameter <span className="em">options</span>. If input parameter <span className="em">action</span> is <span className="em">ttl</span>, it would be the number of minutes for the new TTL. If input parameter <span className="em">action</span> is <span className="em">refresh</span>, this field would be blank.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p>action</p>
                        </li>

                        <li>
                          <p>column\_name</p>
                        </li>

                        <li>
                          <p>table\_name</p>
                        </li>

                        <li>
                          <p><strong>column\_default\_value</strong> – When adding a column, set a literal default value for existing records. For nullable columns, the default value will be null, regardless of data type. Also persisted as the column’s default for future inserts that omit the column.</p>
                        </li>

                        <li>
                          <p><strong>column\_properties</strong> – When adding or changing a column, set the column properties (strings, separated by a comma: data, text\_search, char8, int8 etc).</p>
                        </li>

                        <li>
                          <p><strong>column\_type</strong> – When adding or changing a column, set the column type (strings, separated by a comma: int, double, string, null etc).</p>
                        </li>

                        <li>
                          <p><strong>copy\_values\_from\_column</strong> – \[DEPRECATED] Please use <span className="em">add\_column\_expression</span> instead.</p>
                        </li>

                        <li>
                          <p><strong>rename\_column</strong> – When changing a column, specify new column name.</p>
                        </li>

                        <li>
                          <p><strong>validate\_change\_column</strong> – When changing a column, validate the change before applying it (or not). Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Validate all values. A value too large (or too long) for the new type will prevent any change.</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – When a value is too large or long, it will be truncated.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>update\_last\_access\_time</strong> – Indicates whether the <a className="reference external" href="/content/concepts/ttl/">time-to-live</a> (TTL) expiration countdown timer should be reset to the table’s TTL. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Reset the expiration countdown timer to the table’s configured TTL.</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – Don’t reset the timer; expiration countdown will continue from where it is, as if the table had not been accessed.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>add\_column\_expression</strong> – When adding a column or setting a new default with input parameter <span className="em">action</span> set to <span className="em">set\_default</span>, the new default expression (GPUdb-syntax) for the column. Any valid expression may be used, including one containing references to existing columns in the same table. Persisted as the column’s default for future inserts that omit the column; for add\_column, also used to backfill existing rows.</p>
                        </li>

                        <li>
                          <p><strong>add\_column\_expression\_sql</strong> – Optional SQL-syntax form of <span className="em">add\_column\_expression</span>, used only when the SQL syntax differs from the GPUdb syntax. Persisted alongside the GPUdb form so SHOW CREATE TABLE / information\_schema can reproduce the original SQL.</p>
                        </li>

                        <li>
                          <p><strong>strategy\_definition</strong> – Parameter for specifying the <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns when input parameter <span className="em">action</span> is <span className="em">set\_strategy\_definition</span>, replacing the existing tier strategy in its entirety.</p>
                        </li>

                        <li>
                          <p><strong>index\_type</strong> – Type of index to create, when input parameter <span className="em">action</span> is <span className="em">create\_index</span>; to refresh, when input parameter <span className="em">action</span> is <span className="em">refresh\_index</span>; or to delete, when input parameter <span className="em">action</span> is <span className="em">delete\_index</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>column</strong> – Create or delete a <a className="reference external" href="/content/concepts/indexes/#column-index">column (attribute) index</a>.</p>
                            </li>

                            <li>
                              <p><strong>low\_cardinality</strong> – Create a <a className="reference external" href="/content/concepts/indexes/#low-cardinality-index">low-cardinality column (attribute) index</a>.</p>
                            </li>

                            <li>
                              <p><strong>chunk\_skip</strong> – Create or delete a <a className="reference external" href="/content/concepts/indexes/#chunk-skip-index">chunk skip index</a>.</p>
                            </li>

                            <li>
                              <p><strong>geospatial</strong> – Create or delete a <a className="reference external" href="/content/concepts/indexes/#geospatial-index">geospatial index</a>.</p>
                            </li>

                            <li>
                              <p><strong>cagra</strong> – Create or delete a <a className="reference external" href="/content/concepts/indexes/#cagra-index">CAGRA index</a> on a <a className="reference external" href="/content/vector_search/#vector-type">vector column</a>.</p>
                            </li>

                            <li>
                              <p><strong>hnsw</strong> – Create or delete an <a className="reference external" href="/content/concepts/indexes/#hnsw-index">HNSW index</a> on a <a className="reference external" href="/content/vector_search/#vector-type">vector column</a>.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘column’.</p>
                        </li>

                        <li>
                          <p><strong>index\_options</strong> – Options to use when creating an index, in the format “key: value \[, key: value \[, …]]”. Valid options vary by index type.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>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">action (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Modification operation that was performed.</p>
                    </div>

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

                    <div className="dd">
                      <p>The value of the modification that 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">info (<span className="em">dict of str to str</span>) –</div>

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

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.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">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></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>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <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>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.append_records"> <span className="sig-name descname"><span className="pre">append\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">source\_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">field\_map</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Append (or insert) all records from a source table (specified by input parameter <span className="em">source\_table\_name</span>) to a particular target table (specified by input parameter <span className="em">table\_name</span>). The field map (specified by input parameter <span className="em">field\_map</span>) holds the user specified map of target table column names with their mapped source column names.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>The source table name to get records from, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>. Must be an existing table name.</p>
                    </div>

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

                    <div className="dd">
                      <p>Contains the mapping of column names from the target table (specified by input parameter <span className="em">table\_name</span>) as the keys, and corresponding column names or expressions (e.g., ‘col\_name+1’) from the source table (specified by input parameter <span className="em">source\_table\_name</span>). Must be existing column names in source table and target table, and their types must be matched. For details on using expressions, see <a className="reference external" href="/content/concepts/expressions/">Expressions</a>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>offset</strong> – A positive integer indicating the number of initial results to skip from input parameter <span className="em">source\_table\_name</span>. Default is 0. The minimum allowed value is 0. The maximum allowed value is MAX\_INT. The default value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>limit</strong> – A positive integer indicating the maximum number of results to be returned from input parameter <span className="em">source\_table\_name</span>. Or END\_OF\_SET (-9999) to indicate that the max number of results should be returned. The default value is ‘-9999’.</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – Filter expression to apply to the input parameter <span className="em">source\_table\_name</span>. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – Comma-separated list of the columns to be sorted by from source table (specified by input parameter <span className="em">source\_table\_name</span>), e.g., ‘timestamp asc, x desc’. The <span className="em">order\_by</span> columns do not have to be present in input parameter <span className="em">field\_map</span>. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>update\_on\_existing\_pk</strong> – Specifies the record collision policy for inserting source table records (specified by input parameter <span className="em">source\_table\_name</span>) into a target table (specified by input parameter <span className="em">table\_name</span>) with a <a className="reference external" href="/content/concepts/tables/#primary-keys">primary key</a>. If set to <span className="em">true</span>, any existing table record with primary key values that match those of a source table record being inserted will be replaced by that new record (the new data will be “upserted”). If set to <span className="em">false</span>, any existing table record with primary key values that match those of a source table record being inserted will remain unchanged, while the source record will be rejected and an error handled as determined by <span className="em">ignore\_existing\_pk</span>. If the specified table does not have a primary key, then this option has no effect. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Upsert new records when primary keys match existing records.</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – Reject new records when primary keys match existing records.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>enable\_inplace\_updates</strong> – Applies only when upserting (when <span className="em">update\_on\_existing\_pk</span> is <span className="em">true</span>). If set to <span className="em">true</span>, an existing record matched by primary key is modified in place. If set to <span className="em">false</span>, it is updated by deleting the existing record and inserting a replacement (delete and insert), which prevents the change from being reflected in dependent materialized views until they are refreshed. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>ignore\_existing\_pk</strong> – Specifies the record collision error-suppression policy for inserting source table records (specified by input parameter <span className="em">source\_table\_name</span>) into a target table (specified by input parameter <span className="em">table\_name</span>) with a <a className="reference external" href="/content/concepts/tables/#primary-keys">primary key</a>, only used when not in upsert mode (upsert mode is disabled when <span className="em">update\_on\_existing\_pk</span> is <span className="em">false</span>). If set to <span className="em">true</span>, any source table record being inserted that is rejected for having primary key values that match those of an existing target table record will be ignored with no error generated. If <span className="em">false</span>, the rejection of any source table record for having primary key values matching an existing target table record will result in an error being raised. If the specified table does not have a primary key or if upsert mode is in effect (<span className="em">update\_on\_existing\_pk</span> is <span className="em">true</span>), then this option has no effect. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Ignore source table records whose primary key values collide with those of target table records.</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – Raise an error for any source table record whose primary key values collide with those of a target table record.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>pk\_conflict\_predicate\_higher</strong> – The record with higher value for the column resolves the primary-key insert conflict. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>pk\_conflict\_predicate\_lower</strong> – The record with lower value for the column resolves the primary-key insert conflict. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>truncate\_strings</strong> – If set to <span className="em">true</span>, it allows inserting longer strings into smaller charN string columns by truncating the longer strings to fit. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>The name of the table to which the records were appended.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.clear_statistics"> <span className="sig-name descname"><span className="pre">clear\_statistics</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Clears statistics (cardinality, mean value, etc.) for a column in a specified table.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column in input parameter <span className="em">table\_name</span> for which to clear statistics. The column must be from an existing table. An empty string clears statistics for all columns in the table. The default value is ‘’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">column\_name</span>.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.clear"> <span className="sig-name descname"><span className="pre">clear</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">authorization</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Clears (drops) one or all tables in the database cluster. The operation is synchronous meaning that the table will be cleared before the function returns. The response payload returns the status of the operation along with the name of the table that was cleared.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">authorization (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>No longer used. User can pass an empty string. The default value is ‘’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>no\_error\_if\_not\_exists</strong> – If <span className="em">true</span> and if the table specified in input parameter <span className="em">table\_name</span> does not exist no error is returned. If <span className="em">false</span> and if the table specified in input parameter <span className="em">table\_name</span> does not exist then an error is returned. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span> for a given table, or ‘ALL CLEARED’ in case of clearing all tables.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.collect_statistics"> <span className="sig-name descname"><span className="pre">collect\_statistics</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Collect statistics for a column(s) in a specified table.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>List of one or more column names in input parameter <span className="em">table\_name</span> for which to collect statistics (cardinality, mean value, etc.). A single entry of ‘\*’ expands to every collectable column on the table (geometry, vector, JSON, and array columns are skipped). 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. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">column\_names</span>.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.create_projection"> <span className="sig-name descname"><span className="pre">create\_projection</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_names</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">projection\_name</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></div>

            <div className="dd">
              <p>Creates a new <a className="reference external" href="/content/concepts/projections/">projection</a> of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table.</p>
              <p>For projection details and examples, see <a className="reference external" href="/content/concepts/projections/">Projections</a>. For limitations, see <a className="reference external" href="/content/concepts/projections/#limitations-and-cautions">Projection Limitations and Cautions</a>.</p>
              <p><a className="reference external" href="/content/concepts/window/">Window functions</a>, which can perform operations like moving averages, are available through this endpoint as well as <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.get_records_by_column" title="gpudb.GPUdb.get_records_by_column"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.get\_records\_by\_column()</span></code></a>.</p>
              <p>A projection can be created with a different <a className="reference external" href="/content/concepts/tables/#shard-keys">shard key</a> than the source table. By specifying <span className="em">shard\_key</span>, the projection will be sharded according to the specified columns, regardless of how the source table is sharded. The source table can even be unsharded or replicated.</p>
              <p>If input parameter <span className="em">table\_name</span> is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (<a className="reference external" href="/content/concepts/expressions/#date-time-functions">NOW()</a>), identity (<a className="reference external" href="/content/concepts/expressions/#user-security-functions">USER()</a>), or constant-based functions (<a className="reference external" href="/content/concepts/expressions/#scalar-functions">GEODIST(-77.11, 38.88, -71.06, 42.36)</a>).</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>List of columns from input parameter <span className="em">table\_name</span> to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax ‘column\_name as alias’. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">projection\_name</span>. If <span className="em">persist</span> is <span className="em">false</span> (or unspecified), then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_projection\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the projection as part of input parameter <span className="em">projection\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the projection. If the schema is non-existent, it will be automatically created. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – An optional filter <a className="reference external" href="/content/concepts/expressions/">expression</a> to be applied to the source table prior to the projection. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>is\_replicated</strong> – If <span className="em">true</span> then the projection will be replicated even if the source table is not. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>offset</strong> – The number of initial results to skip (this can be useful for paging through the results). The default value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>limit</strong> – The number of records to keep. The default value is ‘-9999’.</p>
                        </li>

                        <li>
                          <p><strong>order\_by</strong> – Comma-separated list of the columns to be sorted by; e.g. ‘timestamp asc, x desc’. The columns specified must be present in input parameter <span className="em">column\_names</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_size</strong> – Indicates the number of records per chunk to be used for this projection.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_column\_max\_memory</strong> – Indicates the target maximum data size for each column in a chunk to be used for this projection.</p>
                        </li>

                        <li>
                          <p><strong>chunk\_max\_memory</strong> – Indicates the target maximum data size for all columns in a chunk to be used for this projection.</p>
                        </li>

                        <li>
                          <p><strong>create\_indexes</strong> – Comma-separated list of columns on which to create indexes on the projection. The columns specified must be present in input parameter <span className="em">column\_names</span>. If any alias is given for any column name, the alias must be used, rather than the original column name.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the projection specified in input parameter <span className="em">projection\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>shard\_key</strong> – Comma-separated list of the columns to be sharded on; e.g. ‘column1, column2’. The columns specified must be present in input parameter <span className="em">column\_names</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>persist</strong> – If <span className="em">true</span>, then the projection specified in input parameter <span className="em">projection\_name</span> will be persisted and will not expire unless a <span className="em">ttl</span> is specified. If <span className="em">false</span>, then the projection will be an in-memory table and will expire unless a <span className="em">ttl</span> is specified otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>preserve\_dict\_encoding</strong> – If <span className="em">true</span>, then columns that were dict encoded in the source table will be dict encoded in the projection. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>retain\_partitions</strong> – Determines whether the created projection will retain the partitioning scheme from the source table. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>partition\_type</strong> – <a className="reference external" href="/content/concepts/tables/#partitioning">Partitioning</a> scheme to use. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>RANGE</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>INTERVAL</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>LIST</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>HASH</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>SERIES</strong> – Use <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a>.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>partition\_keys</strong> – Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <span className="em">partition\_definitions</span>.</p>
                        </li>

                        <li>
                          <p><strong>partition\_definitions</strong> – Comma-separated list of partition definitions, whose format depends on the choice of <span className="em">partition\_type</span>. See <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitioning</a>, <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>, or <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a> for example formats.</p>
                        </li>

                        <li>
                          <p><strong>is\_automatic\_partition</strong> – If <span className="em">true</span>, a new partition will be created for values which don’t fall into an existing partition. Currently only supported for <a className="reference external" href="/content/concepts/tables/#partitioning-by-list">list partitions</a>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – ID of view of which this projection is a member. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>strategy\_definition</strong> – The <a className="reference external" href="/content/rm/concepts/#tier-strategies">tier strategy</a> for the table and its columns.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – The default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for the projection’s columns.</p>
                        </li>

                        <li>
                          <p><strong>join\_window\_functions</strong> – If set, window functions which require a reshard will be computed separately and joined back together, if the width of the projection is greater than the join\_window\_functions\_threshold. The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>join\_window\_functions\_threshold</strong> – If the projection is greater than this width (in bytes), then window functions which require a reshard will be computed separately and joined back together. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>qualify\_filter</strong> – An optional filter <a className="reference external" href="/content/concepts/expressions/">expression</a> applied to the projection after window function evaluation, equivalent to a SQL QUALIFY clause. May reference window function aliases as well as any other column in the projection. Rows for which the expression evaluates to false (or NULL) are removed from the projection. The default value is ‘’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>Name of the projection to be created, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.create_table_monitor"> <span className="sig-name descname"><span className="pre">create\_table\_monitor</span></span><span className="sig-paren">(</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Creates a monitor that watches for a single table modification event type (insert, update, or delete) on a particular table (identified by input parameter <span className="em">table\_name</span>) and forwards event notifications to subscribers via ZMQ. After this call completes, subscribe to the returned output parameter <span className="em">topic\_id</span> on the ZMQ table monitor port (default 9002). Each time an operation of the given type on the table completes, a multipart message is published for that topic; the first part contains only the topic ID, and each subsequent part contains one binary-encoded Avro object that corresponds to the event and can be decoded using output parameter <span className="em">type\_schema</span>. The monitor will continue to run (regardless of whether or not there are any subscribers) until deactivated with <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.clear_table_monitor" title="gpudb.GPUdb.clear_table_monitor"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.clear\_table\_monitor()</span></code></a>.</p>
              <p>For more information on table monitors, see <a className="reference external" href="/content/concepts/table_monitors/">Table Monitors</a>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>event</strong> – Type of modification event on the target table to be monitored by this table monitor. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>insert</strong> – Get notifications of new record insertions. The new row images are forwarded to the subscribers.</p>
                            </li>

                            <li>
                              <p><strong>update</strong> – Get notifications of update operations. The modified row count information is forwarded to the subscribers.</p>
                            </li>

                            <li>
                              <p><strong>delete</strong> – Get notifications of delete operations. The deleted row count information is forwarded to the subscribers.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘insert’.</p>
                        </li>

                        <li>
                          <p><strong>monitor\_id</strong> – ID to use for this monitor instead of a randomly generated one.</p>
                        </li>

                        <li>
                          <p><strong>datasink\_name</strong> – Name of an existing <a className="reference external" href="/content/concepts/data_sinks/">data sink</a> to send change data notifications to.</p>
                        </li>

                        <li>
                          <p><strong>max\_consecutive\_failures</strong> – Maximum number of consecutive failed notification attempts before suspending the stream. A value of -1 (default) disables auto-suspend. This value is by rank and not overall.</p>
                        </li>

                        <li>
                          <p><strong>failed\_notifications\_table\_name</strong> – Name of a <a className="reference external" href="/content/concepts/tables/">table</a> to which failed stream notifications are written when the stream is suspended. The database will attempt to send notifications persisted in this table when the stream is resumed. The table has the following columns: rank (long), job\_id (long), uuid (uuid), timestamp (timestamp), error\_msg (string), payload (bytes). Leave this option empty to disable persisting failed notification events.</p>
                        </li>

                        <li>
                          <p><strong>destination</strong> – Destination for the output data in format ‘destination\_type://path\[:port]’. Supported destination types are ‘http’, ‘https’ and ‘kafka’.</p>
                        </li>

                        <li>
                          <p><strong>kafka\_topic\_name</strong> – Name of the Kafka topic to publish to if <span className="em">destination</span> in input parameter <span className="em">options</span> is specified and is a Kafka broker.</p>
                        </li>

                        <li>
                          <p><strong>increasing\_column</strong> – Column on subscribed table that will increase for new records (e.g., TIMESTAMP).</p>
                        </li>

                        <li>
                          <p><strong>expression</strong> – Filter expression to limit records for notification.</p>
                        </li>

                        <li>
                          <p><strong>join\_table\_names</strong> – A comma-separated list of tables (optionally with aliases) to include in the join. The monitored table input parameter <span className="em">table\_name</span> must be included, representing only the newly inserted rows (deltas) since the last notification. Other tables can be any existing tables or views. Aliases can be used with the ‘table\_name as alias’ syntax.</p>
                        </li>

                        <li>
                          <p><strong>join\_column\_names</strong> – A comma-separated list of columns or expressions to include from the joined tables. Column references can use table names or aliases defined in ‘join\_table\_names’. Each column can optionally be aliased using ‘as’. The selected columns will also appear in the notification output.</p>
                        </li>

                        <li>
                          <p><strong>join\_expressions</strong> – Filter or join expressions to apply when combining the tables. Expressions are standard SQL-style conditions and can reference any table or alias listed in ‘join\_table\_names’. This corresponds to the WHERE clause of the underlying join, and can include conditions to filter the delta rows.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_method</strong> – Method controlling when the table monitor reports changes to the input parameter <span className="em">table\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>on\_change</strong> – Report changes as they occur.</p>
                            </li>

                            <li>
                              <p><strong>periodic</strong> – Report changes periodically at rate specified by <span className="em">refresh\_period</span>.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘on\_change’.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_period</strong> – When <span className="em">refresh\_method</span> is <span className="em">periodic</span>, specifies the period in seconds at which changes are reported.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_start\_time</strong> – When <span className="em">refresh\_method</span> is <span className="em">periodic</span>, specifies the first time at which changes are reported. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>The ZMQ topic ID to subscribe to for table events.</p>
                    </div>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>JSON Avro schema of the table, for use in decoding published records.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information. Allowed keys are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>ttl</strong> – For insert\_table/delete\_table events, the ttl of the table.</p>
                        </li>

                        <li>
                          <p><strong>insert\_topic\_id</strong> – The topic id for ‘insert’ <span className="em">event</span> in input parameter <span className="em">options</span>.</p>
                        </li>

                        <li>
                          <p><strong>update\_topic\_id</strong> – The topic id for ‘update’ <span className="em">event</span> in input parameter <span className="em">options</span>.</p>
                        </li>

                        <li>
                          <p><strong>delete\_topic\_id</strong> – The topic id for ‘delete’ <span className="em">event</span> in input parameter <span className="em">options</span>.</p>
                        </li>

                        <li>
                          <p><strong>insert\_type\_schema</strong> – The JSON Avro schema of the table in output parameter <span className="em">table\_name</span>.</p>
                        </li>

                        <li>
                          <p><strong>update\_type\_schema</strong> – The JSON Avro schema for ‘update’ events.</p>
                        </li>

                        <li>
                          <p><strong>delete\_type\_schema</strong> – The JSON Avro schema for ‘delete’ events.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.delete_records"> <span className="sig-name descname"><span className="pre">delete\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">expressions</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Deletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more input parameter <span className="em">expressions</span> (matching multiple records), a single record identified by <span className="em">record\_id</span> options, or all records when using <span className="em">delete\_all\_records</span>. Note that the three selection criteria are mutually exclusive. This operation cannot be run on a view. The operation is synchronous meaning that a response will not be available until the request is completely processed and all the matching records are deleted.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">expressions (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>A list of the actual predicates, one for each select; format should follow the guidelines provided <a className="reference external" href="/content/concepts/expressions/">here</a>. Specifying one or more input parameter <span className="em">expressions</span> is mutually exclusive to specifying <span className="em">record\_id</span> in the input parameter <span className="em">options</span>. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>global\_expression</strong> – An optional global expression to reduce the search space of the input parameter <span className="em">expressions</span>. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>record\_id</strong> – A record ID identifying a single record, obtained at the time of <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.insert_records" title="gpudb.GPUdb.insert_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">insertion</span> <span className="pre">of</span> <span className="pre">the</span> <span className="pre">record</span></code></a> or by calling <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.get_records_from_collection" title="gpudb.GPUdb.get_records_from_collection"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.get\_records\_from\_collection()</span></code></a> with the <span className="em">return\_record\_ids</span> option. This option cannot be used to delete records from <a className="reference external" href="/content/concepts/tables/#replication">replicated</a> tables.</p>
                        </li>

                        <li>
                          <p><strong>delete\_all\_records</strong> – If set to <span className="em">true</span>, all records in the table will be deleted. If set to <span className="em">false</span>, then the option is effectively ignored. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">count\_deleted (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Total number of records deleted across all expressions.</p>
                    </div>

                    <div className="dt">counts\_deleted (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>Total number of records deleted per expression.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter"> <span className="sig-name descname"><span className="pre">filter</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">expression</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Filters data based on the specified expression. The results are stored in a <a className="reference external" href="/content/concepts/filtered_views/">result set</a> with the given input parameter <span className="em">view\_name</span>.</p>
              <p>For details see <a className="reference external" href="/content/concepts/expressions/">Expressions</a>.</p>
              <p>The response message contains the number of points for which the expression evaluated to be true, which is equivalent to the size of the result view.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">expression (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>The select expression to filter the specified table. For details see <a className="reference external" href="/content/concepts/expressions/">Expressions</a>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>

                        <li>
                          <p><strong>view\_id</strong> – View this filtered-view is part of. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>ttl</strong> – Sets the <a className="reference external" href="/content/concepts/ttl/">TTL</a> of the view specified in input parameter <span className="em">view\_name</span>.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_area"> <span className="sig-name descname"><span className="pre">filter\_by\_area</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">x\_column\_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">x\_vector</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">y\_column\_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">y\_vector</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which objects from a table are within a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned until all the matching objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input NAI restriction specification is created with the name input parameter <span className="em">view\_name</span> passed in as part of the input.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column containing the x values to be filtered.</p>
                    </div>

                    <div className="dt">x\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>List of x coordinates of the vertices of the polygon representing the area to be filtered. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">y\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the column containing the y values to be filtered.</p>
                    </div>

                    <div className="dt">y\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>List of y coordinates of the vertices of the polygon representing the area to be filtered. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_area_geometry"> <span className="sig-name descname"><span className="pre">filter\_by\_area\_geometry</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">x\_vector</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">y\_vector</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which geospatial geometry objects from a table intersect a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned until all the matching objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input NAI restriction specification is created with the name input parameter <span className="em">view\_name</span> passed in as part of the input.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the geospatial geometry column to be filtered.</p>
                    </div>

                    <div className="dt">x\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>List of x coordinates of the vertices of the polygon representing the area to be filtered. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">y\_vector (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>List of y coordinates of the vertices of the polygon representing the area to be filtered. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] The schema for the newly created view. If the schema is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_box"> <span className="sig-name descname"><span className="pre">filter\_by\_box</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">x\_column\_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">min\_x</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">max\_x</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">y\_column\_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">min\_y</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">max\_y</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates how many objects within the given table lie in a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a input parameter <span className="em">view\_name</span> is passed in as part of the input payload.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column on which to perform the bounding box query. Must be a valid numeric column.</p>
                    </div>

                    <div className="dt">min\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Lower bound for the column chosen by input parameter <span className="em">x\_column\_name</span>. Must be less than or equal to input parameter <span className="em">max\_x</span>.</p>
                    </div>

                    <div className="dt">max\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Upper bound for input parameter <span className="em">x\_column\_name</span>. Must be greater than or equal to input parameter <span className="em">min\_x</span>.</p>
                    </div>

                    <div className="dt">y\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of a column on which to perform the bounding box query. Must be a valid numeric column.</p>
                    </div>

                    <div className="dt">min\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Lower bound for input parameter <span className="em">y\_column\_name</span>. Must be less than or equal to input parameter <span className="em">max\_y</span>.</p>
                    </div>

                    <div className="dt">max\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Upper bound for input parameter <span className="em">y\_column\_name</span>. Must be greater than or equal to input parameter <span className="em">min\_y</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_box_geometry"> <span className="sig-name descname"><span className="pre">filter\_by\_box\_geometry</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">min\_x</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">max\_x</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">min\_y</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">max\_y</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which geospatial geometry objects from a table intersect a rectangular box. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set which satisfies the input NAI restriction specification is also created when a input parameter <span className="em">view\_name</span> is passed in as part of the input payload.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the geospatial geometry column to be filtered.</p>
                    </div>

                    <div className="dt">min\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Lower bound for the x-coordinate of the rectangular box. Must be less than or equal to input parameter <span className="em">max\_x</span>.</p>
                    </div>

                    <div className="dt">max\_x (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Upper bound for the x-coordinate of the rectangular box. Must be greater than or equal to input parameter <span className="em">min\_x</span>.</p>
                    </div>

                    <div className="dt">min\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Lower bound for the y-coordinate of the rectangular box. Must be less than or equal to input parameter <span className="em">max\_y</span>.</p>
                    </div>

                    <div className="dt">max\_y (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Upper bound for the y-coordinate of the rectangular box. Must be greater than or equal to input parameter <span className="em">min\_y</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_geometry"> <span className="sig-name descname"><span className="pre">filter\_by\_geometry</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">input\_wkt</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">operation</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Applies a geometry filter against a geospatial geometry column in a given table or view. The filtering geometry is provided by input parameter <span className="em">input\_wkt</span>.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column to be used in the filter. Must be a geospatial geometry column.</p>
                    </div>

                    <div className="dt">input\_wkt (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>A geometry in WKT format that will be used to filter the objects in input parameter <span className="em">table\_name</span>. The default value is ‘’.</p>
                    </div>

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

                    <div className="dd">
                      <p>The geometric filtering operation to perform. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>contains</strong> – Matches records that contain the given WKT in input parameter <span className="em">input\_wkt</span>, i.e. the given WKT is within the bounds of a record’s geometry.</p>
                        </li>

                        <li>
                          <p><strong>crosses</strong> – Matches records that cross the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>disjoint</strong> – Matches records that are disjoint from the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>equals</strong> – Matches records that are the same as the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>intersects</strong> – Matches records that intersect the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>overlaps</strong> – Matches records that overlap the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>touches</strong> – Matches records that touch the given WKT.</p>
                        </li>

                        <li>
                          <p><strong>within</strong> – Matches records that are within the given WKT.</p>
                        </li>
                      </ul>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_list"> <span className="sig-name descname"><span className="pre">filter\_by\_list</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_values\_map</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which records from a table have values in the given list for the corresponding column. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input filter specification is also created if a input parameter <span className="em">view\_name</span> is passed in as part of the request.</p>
              <p>For example, if a type definition has the columns ‘x’ and ‘y’, then a filter by list query with the column map {"{"}“x”:\[“10.1”, “2.3”], “y”:\[“0.0”, “-31.5”, “42.0”]{"}"} will return the count of all data points whose x and y values match both in the respective x- and y-lists, e.g., “x = 10.1 and y = 0.0”, “x = 2.3 and y = -31.5”, etc. However, a record with “x = 10.1 and y = -31.5” or “x = 2.3 and y = 0.0” would not be returned because the values in the given lists do not correspond.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">column\_values\_map (<span className="em">dict of str to lists of str</span>) –</div>

                    <div className="dd">
                      <p>List of values for the corresponding column in the table.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>

                        <li>
                          <p><strong>filter\_mode</strong> – String indicating the filter mode, either ‘in\_list’ or ‘not\_in\_list’. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>in\_list</strong> – The filter will match all items that are in the provided list(s).</p>
                            </li>

                            <li>
                              <p><strong>not\_in\_list</strong> – The filter will match all items that are not in the provided list(s).</p>
                            </li>
                          </ul>

                          <p>The default value is ‘in\_list’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_radius"> <span className="sig-name descname"><span className="pre">filter\_by\_radius</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">x\_column\_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">x\_center</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">y\_column\_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">y\_center</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">radius</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which objects from a table lie within a circle with the given radius and center point (i.e. circular NAI). The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input circular NAI restriction specification is also created if a input parameter <span className="em">view\_name</span> is passed in as part of the request.</p>
              <p>For track data, all track points that lie within the circle plus one point on either side of the circle (if the track goes beyond the circle) will be included in the result.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column to be used for the x-coordinate (the longitude) of the center.</p>
                    </div>

                    <div className="dt">x\_center (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the longitude of the center. Must be within \[-180.0, 180.0]. The minimum allowed value is -180. The maximum allowed value is 180.</p>
                    </div>

                    <div className="dt">y\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the column to be used for the y-coordinate-the latitude-of the center.</p>
                    </div>

                    <div className="dt">y\_center (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the latitude of the center. Must be within \[-90.0, 90.0]. The minimum allowed value is -90. The maximum allowed value is 90.</p>
                    </div>

                    <div className="dt">radius (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The radius of the circle within which the search will be performed. Must be a non-zero positive value. It is in meters; so, for example, a value of ‘42000’ means 42 km. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema which is to contain the newly created view. If the schema is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_radius_geometry"> <span className="sig-name descname"><span className="pre">filter\_by\_radius\_geometry</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">x\_center</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">y\_center</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">radius</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which geospatial geometry objects from a table intersect a circle with the given radius and center point (i.e. circular NAI). The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input circular NAI restriction specification is also created if a input parameter <span className="em">view\_name</span> is passed in as part of the request.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the geospatial geometry column to be filtered.</p>
                    </div>

                    <div className="dt">x\_center (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the longitude of the center. Must be within \[-180.0, 180.0]. The minimum allowed value is -180. The maximum allowed value is 180.</p>
                    </div>

                    <div className="dt">y\_center (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the latitude of the center. Must be within \[-90.0, 90.0]. The minimum allowed value is -90. The maximum allowed value is 90.</p>
                    </div>

                    <div className="dt">radius (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The radius of the circle within which the search will be performed. Must be a non-zero positive value. It is in meters; so, for example, a value of ‘42000’ means 42 km. The minimum allowed value is 0. The maximum allowed value is MAX\_INT.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></code></a> to create the schema if non-existent] Name of a schema for the newly created view. If the schema provided is non-existent, it will be automatically created.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_range"> <span className="sig-name descname"><span className="pre">filter\_by\_range</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">lower\_bound</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">upper\_bound</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which objects from a table have a column that is within the given bounds. An object from the table identified by input parameter <span className="em">table\_name</span> is added to the view input parameter <span className="em">view\_name</span> if its column is within \[input parameter <span className="em">lower\_bound</span>, input parameter <span className="em">upper\_bound</span>] (inclusive). The operation is synchronous. The response provides a count of the number of objects which passed the bound filter. Although this functionality can also be accomplished with the standard filter function, it is more efficient.</p>
              <p>For track objects, the count reflects how many points fall within the given bounds (which may not include all the track points of any given track).</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of a column on which the operation would be applied.</p>
                    </div>

                    <div className="dt">lower\_bound (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the lower bound (inclusive).</p>
                    </div>

                    <div className="dt">upper\_bound (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>Value of the upper bound (inclusive).</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_series"> <span className="sig-name descname"><span className="pre">filter\_by\_series</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">track\_id</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">target\_track\_ids</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Filters objects matching all points of the given track (works only on track type data). It allows users to specify a particular track to find all other points in the table that fall within specified ranges (spatial and temporal) of all points of the given track. Additionally, the user can specify another track to see if the two intersect (or go close to each other within the specified ranges). The user also has the flexibility of using different metrics for the spatial distance calculation: Euclidean (flat geometry) or Great Circle (spherical geometry to approximate the Earth’s surface distances). The filtered points are stored in a newly created result set. The return value of the function is the number of points in the resultant set (view).</p>
              <p>This operation is synchronous, meaning that a response will not be returned until all the objects are fully available.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>The ID of the track which will act as the filtering points. Must be an existing track within the given table.</p>
                    </div>

                    <div className="dt">target\_track\_ids (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>Up to one track ID to intersect with the “filter” track. If any provided, it must be an valid track ID within the given set. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>

                        <li>
                          <p><strong>spatial\_radius</strong> – A positive number passed as a string representing the radius of the search area centered around each track point’s geospatial coordinates. The value is interpreted in meters. Required parameter. The minimum allowed value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>time\_radius</strong> – A positive number passed as a string representing the maximum allowable time difference between the timestamps of a filtered object and the given track’s points. The value is interpreted in seconds. Required parameter. The minimum allowed value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>spatial\_distance\_metric</strong> – A string representing the coordinate system to use for the spatial search criteria. Acceptable values are ‘euclidean’ and ‘great\_circle’. Optional parameter; default is ‘euclidean’. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>euclidean</p>
                            </li>

                            <li>
                              <p>great\_circle</p>
                            </li>
                          </ul>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_string"> <span className="sig-name descname"><span className="pre">filter\_by\_string</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">expression</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">mode</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\_names</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">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which objects from a table or view match a string expression for the given string columns. Setting <span className="em">case\_sensitive</span> can modify case sensitivity in matching for all modes except <span className="em">search</span>. For <span className="em">search</span> mode details and limitations, see <a className="reference external" href="/content/concepts/full_text_search/">Full Text Search</a>.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">expression (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>The expression with which to filter the table.</p>
                    </div>

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

                    <div className="dd">
                      <p>The string filtering mode to apply. See below for details. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>search</strong> – Full text search query with wildcards and boolean operators. Note that for this mode, no column can be specified in input parameter <span className="em">column\_names</span>; all string columns of the table that have text search enabled will be searched.</p>
                        </li>

                        <li>
                          <p><strong>equals</strong> – Exact whole-string match (accelerated).</p>
                        </li>

                        <li>
                          <p><strong>contains</strong> – Partial substring match (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0.</p>
                        </li>

                        <li>
                          <p><strong>starts\_with</strong> – Strings that start with the given expression (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0.</p>
                        </li>

                        <li>
                          <p><strong>regex</strong> – Full regular expression search (not accelerated). If the column is a string type (non-charN) and the number of records is too large, it will return 0.</p>
                        </li>
                      </ul>
                    </div>

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

                    <div className="dd">
                      <p>List of columns on which to apply the filter. Ignored for <span className="em">search</span> mode. 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. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>

                        <li>
                          <p><strong>case\_sensitive</strong> – If <span className="em">false</span> then string filtering will ignore case. Does not apply to <span className="em">search</span> mode. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_table"> <span className="sig-name descname"><span className="pre">filter\_by\_table</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">column\_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">source\_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">source\_table\_column\_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">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>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 input parameter <span className="em">view\_name</span> 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.</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Name of the column by whose value the data will be filtered from the table designated by input parameter <span className="em">table\_name</span>.</p>
                    </div>

                    <div className="dt">source\_table\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the table whose data will be compared against in the table called input parameter <span className="em">table\_name</span>, in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>. Must be an existing table.</p>
                    </div>

                    <div className="dt">source\_table\_column\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Name of the column in the input parameter <span className="em">source\_table\_name</span> whose values will be used as the filter for table input parameter <span className="em">table\_name</span>. Must be a geospatial geometry column if in ‘spatial’ mode; otherwise, Must match the type of the input parameter <span className="em">column\_name</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>

                        <li>
                          <p><strong>filter\_mode</strong> – String indicating the filter mode, either <span className="em">in\_table</span> or <span className="em">not\_in\_table</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>in\_table</p>
                            </li>

                            <li>
                              <p>not\_in\_table</p>
                            </li>
                          </ul>

                          <p>The default value is ‘in\_table’.</p>
                        </li>

                        <li>
                          <p><strong>mode</strong> – Mode - should be either <span className="em">spatial</span> or <span className="em">normal</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>normal</p>
                            </li>

                            <li>
                              <p>spatial</p>
                            </li>
                          </ul>

                          <p>The default value is ‘normal’.</p>
                        </li>

                        <li>
                          <p><strong>buffer</strong> – Buffer size, in meters. Only relevant for <span className="em">spatial</span> mode. The default value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>buffer\_method</strong> – Method used to buffer polygons. Only relevant for <span className="em">spatial</span> mode. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>normal</p>
                            </li>

                            <li>
                              <p><strong>geos</strong> – Use geos 1 edge per corner algorithm.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘normal’.</p>
                        </li>

                        <li>
                          <p><strong>max\_partition\_size</strong> – Maximum number of points in a partition. Only relevant for <span className="em">spatial</span> mode. The default value is ‘0’.</p>
                        </li>

                        <li>
                          <p><strong>max\_partition\_score</strong> – Maximum number of points \* edges in a partition. Only relevant for <span className="em">spatial</span> mode. The default value is ‘8000000’.</p>
                        </li>

                        <li>
                          <p><strong>x\_column\_name</strong> – Name of column containing x value of point being filtered in <span className="em">spatial</span> mode. The default value is ‘x’.</p>
                        </li>

                        <li>
                          <p><strong>y\_column\_name</strong> – Name of column containing y value of point being filtered in <span className="em">spatial</span> mode. The default value is ‘y’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.filter_by_value"> <span className="sig-name descname"><span className="pre">filter\_by\_value</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">is\_string</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">value</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">0</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">value\_str</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">column\_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">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">view\_name</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">''</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Calculates which objects from a table has a particular value for a particular column. The input parameters provide a way to specify either a String or a Double valued column and a desired value for the column on which the filter is performed. The operation is synchronous, meaning that a response will not be returned until all the objects are fully available. The response payload provides the count of the resulting set. A new result view which satisfies the input filter restriction specification is also created with a view name passed in as part of the input payload. Although this functionality can also be accomplished with the standard filter function, it is more efficient.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">is\_string (<span className="em">bool</span>) –</div>

                    <div className="dd">
                      <p>Indicates whether the value being searched for is string or numeric.</p>
                    </div>

                    <div className="dt">value (<span className="em">float</span>) –</div>

                    <div className="dd">
                      <p>The value to search for. The default value is 0.</p>
                    </div>

                    <div className="dt">value\_str (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>The string value to search for. The default value is ‘’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Name of a column on which the filter by value would be applied.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>create\_temp\_table</strong> – If <span className="em">true</span>, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter <span className="em">view\_name</span>. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in <span className="em">qualified\_view\_name</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>collection\_name</strong> – \[DEPRECATED–please specify the containing schema for the view as part of input parameter <span className="em">view\_name</span> and use <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.create_schema" title="gpudb.GPUdb.create_schema"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_schema()</span></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.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>

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

                    <div className="dd">
                      <p>If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a> and meeting <a className="reference external" href="/content/concepts/tables/#table-naming-criteria">table naming criteria</a>. Must not be an already existing table or view. The default value is ‘’.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>A read-only GPUdbTable object.</p>
                </div>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.lock_table"> <span className="sig-name descname"><span className="pre">lock\_table</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">lock\_type</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'status'</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Manages global access to a table’s data. By default a table has a input parameter <span className="em">lock\_type</span> of <span className="em">read\_write</span>, indicating all operations are permitted. A user may request a <span className="em">read\_only</span> or a <span className="em">write\_only</span> lock, after which only read or write operations, respectively, are permitted on the table until the lock is removed. When input parameter <span className="em">lock\_type</span> is <span className="em">no\_access</span> then no operations are permitted on the table. The lock status can be queried by setting input parameter <span className="em">lock\_type</span> to <span className="em">status</span>.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">lock\_type (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>The type of lock being applied to the table. Setting it to <span className="em">status</span> will return the current lock status of the table without changing it. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p><strong>status</strong> – Show locked status.</p>
                        </li>

                        <li>
                          <p><strong>no\_access</strong> – Allow no read/write operations.</p>
                        </li>

                        <li>
                          <p><strong>read\_only</strong> – Allow only read operations.</p>
                        </li>

                        <li>
                          <p><strong>write\_only</strong> – Allow only write operations.</p>
                        </li>

                        <li>
                          <p><strong>read\_write</strong> – Allow all read/write operations.</p>
                        </li>
                      </ul>

                      <p>The default value is ‘status’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>Returns the lock state of the table.</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.show_table"> <span className="sig-name descname"><span className="pre">show\_table</span></span><span className="sig-paren">(</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Retrieves detailed information about a table, view, or schema, specified in input parameter <span className="em">table\_name</span>. If the supplied input parameter <span className="em">table\_name</span> is a schema the call can return information about either the schema itself or the tables and views it contains. If input parameter <span className="em">table\_name</span> is empty, information about all schemas will be returned.</p>
              <p>If the option <span className="em">get\_sizes</span> is set to <span className="em">true</span>, then the number of records in each table is returned (in output parameter <span className="em">sizes</span> and output parameter <span className="em">full\_sizes</span>), along with the total number of objects across all requested tables (in output parameter <span className="em">total\_size</span> and output parameter <span className="em">total\_full\_size</span>).</p>
              <p>For a schema, setting the <span className="em">show\_children</span> option to <span className="em">false</span> returns only information about the schema itself; setting <span className="em">show\_children</span> to <span className="em">true</span> returns a list of tables and views contained in the schema, along with their corresponding detail.</p>
              <p>To retrieve a list of every table, view, and schema in the database, set input parameter <span className="em">table\_name</span> to ‘\*’ and <span className="em">show\_children</span> to <span className="em">true</span>. When doing this, the returned output parameter <span className="em">total\_size</span> and output parameter <span className="em">total\_full\_size</span> will not include the sizes of non-base tables (e.g., filters, views, joins, etc.).</p>
              <p><strong>Parameters</strong></p>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>dependencies</strong> – Include view dependencies in the output. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>force\_synchronous</strong> – If <span className="em">true</span> then the table sizes will wait for read lock before returning. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>get\_access\_data</strong> – If <span className="em">true</span> then data about the last read, write, alter and create will be returned. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>get\_cached\_sizes</strong> – If <span className="em">true</span> then the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. This version will return the sizes cached at rank 0, which may be stale if there is a multihead insert occurring. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>get\_sizes</strong> – If <span className="em">true</span> then the number of records in each table, along with a cumulative count, will be returned; blank, otherwise. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>referencing\_materialized\_views</strong> – Include materialized views using this table as a source in the output. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>skip\_additional\_info</strong> – If <span className="em">true</span> then the response will not populate the additional\_info field. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>no\_error\_if\_not\_exists</strong> – If <span className="em">false</span> will return an error if the provided input parameter <span className="em">table\_name</span> does not exist. If <span className="em">true</span> then it will return an empty result. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>skip\_temp\_schemas</strong> – If <span className="em">true</span> then the table list will not include tables from SYS\_TEMP and other system temporary schemas. This is the default behavior for non-admin users. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>show\_children</strong> – If input parameter <span className="em">table\_name</span> is a schema, then <span className="em">true</span> will return information about the tables and views in the schema, and <span className="em">false</span> will return information about the schema itself. If input parameter <span className="em">table\_name</span> is a table or view, <span className="em">show\_children</span> must be <span className="em">false</span>. If input parameter <span className="em">table\_name</span> is empty, then <span className="em">show\_children</span> must be <span className="em">true</span>. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>get\_column\_info</strong> – If <span className="em">true</span> then column info (memory usage, etc) will be returned. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

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

                    <div className="dd">
                      <p>Value of input parameter <span className="em">table\_name</span>.</p>
                    </div>

                    <div className="dt">table\_names (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>If input parameter <span className="em">table\_name</span> is a table or view, then the single element of the array is input parameter <span className="em">table\_name</span>. If input parameter <span className="em">table\_name</span> is a schema and <span className="em">show\_children</span> is set to <span className="em">true</span>, then this array is populated with the names of all tables and views in the given schema; if <span className="em">show\_children</span> is <span className="em">false</span>, then this array will only include the schema name itself. If input parameter <span className="em">table\_name</span> is an empty string, then the array contains the names of all tables in the user’s default schema.</p>
                    </div>

                    <div className="dt">table\_descriptions (<span className="em">list of lists of str</span>) –</div>

                    <div className="dd">
                      <p>List of descriptions for the respective tables in output parameter <span className="em">table\_names</span>. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>COLLECTION</p>
                        </li>

                        <li>
                          <p>JOIN</p>
                        </li>

                        <li>
                          <p>LOGICAL\_EXTERNAL\_TABLE</p>
                        </li>

                        <li>
                          <p>LOGICAL\_VIEW</p>
                        </li>

                        <li>
                          <p>MATERIALIZED\_EXTERNAL\_TABLE</p>
                        </li>

                        <li>
                          <p>MATERIALIZED\_VIEW</p>
                        </li>

                        <li>
                          <p>MATERIALIZED\_VIEW\_MEMBER</p>
                        </li>

                        <li>
                          <p>MATERIALIZED\_VIEW\_UNDER\_CONSTRUCTION</p>
                        </li>

                        <li>
                          <p>REPLICATED</p>
                        </li>

                        <li>
                          <p>RESULT\_TABLE</p>
                        </li>

                        <li>
                          <p>SCHEMA</p>
                        </li>

                        <li>
                          <p>VIEW</p>
                        </li>
                      </ul>
                    </div>

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

                    <div className="dd">
                      <p>Type IDs of the respective tables in output parameter <span className="em">table\_names</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Type schemas of the respective tables in output parameter <span className="em">table\_names</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Type labels of the respective tables in output parameter <span className="em">table\_names</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Property maps of the respective tables in output parameter <span className="em">table\_names</span>.</p>
                    </div>

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

                    <div className="dd">
                      <p>Additional information about the respective tables in output parameter <span className="em">table\_names</span>. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>request\_avro\_type</strong> – Method by which this table was created. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>create\_table</p>
                            </li>

                            <li>
                              <p>create\_projection</p>
                            </li>

                            <li>
                              <p>create\_union</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>request\_avro\_json</strong> – The JSON representation of request creating this table. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>protected</strong> – No longer used. Indicated whether the respective table was protected or not. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>record\_bytes</strong> – The number of in-memory bytes per record which is the sum of the byte sizes of all columns with property ‘data’.</p>
                        </li>

                        <li>
                          <p><strong>total\_bytes</strong> – The total size in bytes of all data stored in the table.</p>
                        </li>

                        <li>
                          <p><strong>collection\_names</strong> – \[DEPRECATED–use schema\_name instead] This will now contain the name of the schema for the table. There can only be one schema for a table.</p>
                        </li>

                        <li>
                          <p><strong>schema\_name</strong> – The name of the schema for the table. There can only be one schema for a table.</p>
                        </li>

                        <li>
                          <p><strong>table\_ttl</strong> – The value of the <a className="reference external" href="/content/concepts/ttl/">time-to-live</a> setting. Not present for schemas.</p>
                        </li>

                        <li>
                          <p><strong>remaining\_table\_ttl</strong> – The remaining <a className="reference external" href="/content/concepts/ttl/">time-to-live</a>, in minutes, before the respective table expires (-1 if it will never expire). Not present for schemas.</p>
                        </li>

                        <li>
                          <p><strong>primary\_key\_type</strong> – The primary key type of the table (if it has a primary key). Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>memory</strong> – In-memory primary key.</p>
                            </li>

                            <li>
                              <p><strong>disk</strong> – On-disk primary key.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>foreign\_keys</strong> – Semicolon-separated list of <a className="reference external" href="/content/concepts/tables/#foreign-key">foreign keys</a>, of the format ‘source\_column references target\_table(primary\_key\_column)’. Not present for schemas. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>foreign\_shard\_key</strong> – Foreign shard key description of the format: \<fk\_foreign\_key> references \<pk\_column\_name> from \<pk\_table\_name>(\<pk\_primary\_key>). Not present for schemas. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>partition\_type</strong> – <a className="reference external" href="/content/concepts/tables/#partitioning">Partitioning</a> scheme used for this table. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>RANGE</strong> – Using <a className="reference external" href="/content/concepts/tables/#partitioning-by-range">range partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>INTERVAL</strong> – Using <a className="reference external" href="/content/concepts/tables/#partitioning-by-interval">interval partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>LIST</strong> – Using <a className="reference external" href="/content/concepts/tables/#partitioning-by-list-manual">manual list partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>HASH</strong> – Using <a className="reference external" href="/content/concepts/tables/#partitioning-by-hash">hash partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>SERIES</strong> – Using <a className="reference external" href="/content/concepts/tables/#partitioning-by-series">series partitioning</a>.</p>
                            </li>

                            <li>
                              <p><strong>NONE</strong> – Using no partitioning.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘NONE’.</p>
                        </li>

                        <li>
                          <p><strong>partition\_keys</strong> – Comma-separated list of partition keys. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>partition\_definitions</strong> – Comma-separated list of partition definitions, whose format depends on the partition\_type. See <a className="reference external" href="/content/concepts/tables/#partitioning">partitioning</a> documentation for details. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>is\_automatic\_partition</strong> – True if partitions will be created for LIST VALUES which don’t fall into existing partitions. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>attribute\_indexes</strong> – Semicolon-separated list of indexes. For <a className="reference external" href="/content/concepts/indexes/#column-index">column (attribute) indexes</a>, only the indexed column name will be listed. For other index types, the index type will be listed with the colon-delimited indexed column(s) and the comma-delimited index option(s) using the form: \<index\_type>@\<column\_list>@\<column\_options>. Not present for schemas. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>column\_info</strong> – JSON-encoded string representing a map of column name to information including memory usage if the <span className="em">get\_column\_info</span> option is <span className="em">true</span>. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>global\_access\_mode</strong> – Returns the global access mode (i.e. lock status) for the table. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>no\_access</strong> – No read/write operations are allowed on this table.</p>
                            </li>

                            <li>
                              <p><strong>read\_only</strong> – Only read operations are allowed on this table.</p>
                            </li>

                            <li>
                              <p><strong>write\_only</strong> – Only write operations are allowed on this table.</p>
                            </li>

                            <li>
                              <p><strong>read\_write</strong> – All read/write operations are allowed on this table.</p>
                            </li>
                          </ul>
                        </li>

                        <li>
                          <p><strong>view\_table\_name</strong> – For materialized view the name of the view this member table is part of - if same as the table\_name then this is the root of the view. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>is\_view\_persisted</strong> – True if the view named view\_table\_name is persisted - reported for each view member. Means method of recreating this member is saved - not the members data. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>is\_dirty</strong> – True if some input table of the materialized view that affects this member table has been modified since the last refresh. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_method</strong> – For materialized view current refresh\_method - one of manual, periodic, on\_change. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_start\_time</strong> – For materialized view with periodic refresh\_method the initial datetime string that periodic refreshes began. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_stop\_time</strong> – Time at which the periodic view refresh stops. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>refresh\_period</strong> – For materialized view with periodic refresh\_method the current refresh period in seconds. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_refresh\_time</strong> – For materialized view the datetime string indicating the last time the view was refreshed. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>next\_refresh\_time</strong> – For materialized view with periodic refresh\_method a datetime string indicating the next time the view is to be refreshed. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>user\_chunk\_size</strong> – User-specified number of records per chunk, if provided at table creation time. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>user\_chunk\_column\_max\_memory</strong> – User-specified target max bytes per column in a chunk, if provided at table creation time. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>user\_chunk\_max\_memory</strong> – User-specified target max bytes for all columns in a chunk, if provided at table creation time. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>owner\_resource\_group</strong> – Name of the owner resource group. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>alternate\_shard\_keys</strong> – Semicolon-separated list of shard keys that were equated in joins (applicable for join tables). The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>datasource\_subscriptions</strong> – Semicolon-separated list of datasource names the table has subscribed to. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>null\_modifying\_columns</strong> – Comma-separated list of null modifying column names. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>compression\_codec</strong> – Default <a className="reference external" href="/content/concepts/column_compression/">compression codec</a> for the table. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>created\_by</strong> – User that created this table or view. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>created\_time</strong> – Time (UTC) when this table or view was created. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_read\_by</strong> – User that last read this table or view. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_read\_time</strong> – Time (UTC) when this table or view was last read. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>read\_count</strong> – Count of times this table or view was read. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_write\_by</strong> – User that last wrote to this table. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_write\_time</strong> – Time (UTC) when this table was last written. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>write\_count</strong> – Count of times this table was written. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_alter\_by</strong> – User that last altered this table or view. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>last\_alter\_time</strong> – Time (UTC) when this table or view was last altered. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>alter\_count</strong> – Count of times this table or view was altered. The default value is ‘’.</p>
                        </li>
                      </ul>
                    </div>

                    <div className="dt">sizes (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>If <span className="em">get\_sizes</span> is <span className="em">true</span>, an array containing the number of records of each corresponding table in output parameter <span className="em">table\_names</span>. Otherwise, an empty array.</p>
                    </div>

                    <div className="dt">full\_sizes (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>If <span className="em">get\_sizes</span> is <span className="em">true</span>, an array containing the number of records of each corresponding table in output parameter <span className="em">table\_names</span> (same values as output parameter <span className="em">sizes</span>). Otherwise, an empty array.</p>
                    </div>

                    <div className="dt">join\_sizes (<span className="em">list of floats</span>) –</div>

                    <div className="dd">
                      <p>If <span className="em">get\_sizes</span> is <span className="em">true</span>, an array containing the number of unfiltered records in the cross product of the sub-tables of each corresponding join-table in output parameter <span className="em">table\_names</span>. For simple tables, this number will be the same as output parameter <span className="em">sizes</span>. For join-tables, this value gives the number of joined-table rows that must be processed by any aggregate functions operating on the table. Otherwise, (if <span className="em">get\_sizes</span> is <span className="em">false</span>), an empty array.</p>
                    </div>

                    <div className="dt">total\_size (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>If <span className="em">get\_sizes</span> is <span className="em">true</span>, the sum of the elements of output parameter <span className="em">sizes</span>. Otherwise, -1.</p>
                    </div>

                    <div className="dt">total\_full\_size (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>If <span className="em">get\_sizes</span> is <span className="em">true</span>, the sum of the elements of output parameter <span className="em">full\_sizes</span> (same value as output parameter <span className="em">total\_size</span>). Otherwise, -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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>

          <div className="dl py method">
            <div className="dt sig sig-object py" id="gpudb.GPUdbTable.update_records"> <span className="sig-name descname"><span className="pre">update\_records</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">expressions</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">new\_values\_maps</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">records\_to\_insert</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">\[]</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">records\_to\_insert\_str</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">\[]</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">record\_encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</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">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Runs multiple predicate-based updates in a single call. With the list of given expressions, any matching record’s column values will be updated as provided in input parameter <span className="em">new\_values\_maps</span>. There is also an optional ‘upsert’ capability where if a particular predicate doesn’t match any existing record, then a new record can be inserted.</p>
              <p>Note that this operation can only be run on an original table and not on a result view.</p>
              <p>This operation can update primary key values. By default only ‘pure primary key’ predicates are allowed when updating primary key values. If the primary key for a table is the column ‘attr1’, then the operation will only accept predicates of the form: “attr1 == ‘foo’” if the attr1 column is being updated. For a composite primary key (e.g. columns ‘attr1’ and ‘attr2’) then this operation will only accept predicates of the form: “(attr1 == ‘foo’) and (attr2 == ‘bar’)”. Meaning, all primary key columns must appear in an equality predicate in the expressions. Furthermore each ‘pure primary key’ predicate must be unique within a given request. These restrictions can be removed by utilizing some available options through input parameter <span className="em">options</span>.</p>
              <p>The <span className="em">update\_on\_existing\_pk</span> option specifies the record primary key collision policy for tables with a <a className="reference external" href="/content/concepts/tables/#primary-keys">primary key</a>, while <span className="em">ignore\_existing\_pk</span> specifies the record primary key collision error-suppression policy when those collisions result in the update being rejected. Both are ignored on tables with no primary key.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">expressions (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>A list of the actual predicates, one for each update; format should follow the guidelines <a className="reference internal" href="#gpudb.GPUdbTable.filter" title="gpudb.GPUdbTable.filter"><code className="xref py py-meth docutils literal notranslate"><span className="pre">here</span></code></a>. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">new\_values\_maps (<span className="em">list of dicts of str to optional str</span>) –</div>

                    <div className="dd">
                      <p>List of new values for the matching records. Each element is a map with (key, value) pairs where the keys are the names of the columns whose values are to be updated; the values are the new values. The number of elements in the list should match the length of input parameter <span className="em">expressions</span>. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">records\_to\_insert (<span className="em">list of bytes</span>) –</div>

                    <div className="dd">
                      <p>An <span className="em">optional</span> list of new binary-avro encoded records to insert, one for each update. If one of input parameter <span className="em">expressions</span> does not yield a matching record to be updated, then the corresponding element from this list will be added to the table. The default value is an empty list ( \[] ). The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">records\_to\_insert\_str (<span className="em">list of str</span>) –</div>

                    <div className="dd">
                      <p>An optional list of JSON encoded objects to insert, one for each update, to be added if the particular update did not match any objects. The default value is an empty list ( \[] ). The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
                    </div>

                    <div className="dt">record\_encoding (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>Identifies which of input parameter <span className="em">records\_to\_insert</span> and input parameter <span className="em">records\_to\_insert\_str</span> should be used. Allowed values are:</p>

                      <ul className="simple">
                        <li>
                          <p>binary</p>
                        </li>

                        <li>
                          <p>json</p>
                        </li>
                      </ul>

                      <p>The default value is ‘binary’.</p>
                    </div>

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

                    <div className="dd">
                      <p>Optional parameters. Allowed keys are:</p>

                      <ul>
                        <li>
                          <p><strong>global\_expression</strong> – An optional global expression to reduce the search space of the predicates listed in input parameter <span className="em">expressions</span>. The default value is ‘’.</p>
                        </li>

                        <li>
                          <p><strong>bypass\_safety\_checks</strong> – When set to <span className="em">true</span>, all predicates are available for primary key updates. Keep in mind that it is possible to destroy data in this case, since a single predicate may match multiple objects (potentially all of records of a table), and then updating all of those records to have the same primary key will, due to the primary key uniqueness constraints, effectively delete all but one of those updated records. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>update\_on\_existing\_pk</strong> – Specifies the record collision policy for updating a table with a <a className="reference external" href="/content/concepts/tables/#primary-keys">primary key</a>. There are two ways that a record collision can occur.</p>
                          <p>The first is an “update collision”, which happens when the update changes the value of the updated record’s primary key, and that new primary key already exists as the primary key of another record in the table.</p>
                          <p>The second is an “insert collision”, which occurs when a given filter in input parameter <span className="em">expressions</span> finds no records to update, and the alternate insert record given in input parameter <span className="em">records\_to\_insert</span> (or input parameter <span className="em">records\_to\_insert\_str</span>) contains a primary key matching that of an existing record in the table.</p>
                          <p>If <span className="em">update\_on\_existing\_pk</span> is set to <span className="em">true</span>, “update collisions” will result in the existing record collided into being removed and the record updated with values specified in input parameter <span className="em">new\_values\_maps</span> taking its place; “insert collisions” will result in the collided-into record being updated with the values in input parameter <span className="em">records\_to\_insert</span> / input parameter <span className="em">records\_to\_insert\_str</span> (if given).</p>
                          <p>If set to <span className="em">false</span>, the existing collided-into record will remain unchanged, while the update will be rejected and the error handled as determined by <span className="em">ignore\_existing\_pk</span>. If the specified table does not have a primary key, then this option has no effect. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Overwrite the collided-into record when updating a record’s primary key or inserting an alternate record causes a primary key collision between the record being updated/inserted and another existing record in the table</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – Reject updates which cause primary key collisions between the record being updated/inserted and an existing record in the table</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>ignore\_existing\_pk</strong> – Specifies the record collision error-suppression policy for updating a table with a <a className="reference external" href="/content/concepts/tables/#primary-keys">primary key</a>, only used when primary key record collisions are rejected (<span className="em">update\_on\_existing\_pk</span> is <span className="em">false</span>). If set to <span className="em">true</span>, any record update that is rejected for resulting in a primary key collision with an existing table record will be ignored with no error generated. If <span className="em">false</span>, the rejection of any update for resulting in a primary key collision will cause an error to be reported. If the specified table does not have a primary key or if <span className="em">update\_on\_existing\_pk</span> is <span className="em">true</span>, then this option has no effect. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p><strong>true</strong> – Ignore updates that result in primary key collisions with existing records.</p>
                            </li>

                            <li>
                              <p><strong>false</strong> – Treat as errors any updates that result in primary key collisions with existing records.</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>update\_partition</strong> – Force qualifying records to be deleted and reinserted so their partition membership will be reevaluated. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>enable\_inplace\_updates</strong> – If set to <span className="em">true</span>, qualifying records are modified in place. If set to <span className="em">false</span>, they are updated by deleting the existing record and inserting a replacement (delete and insert), which prevents the change from being reflected in dependent materialized views until they are refreshed. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘true’.</p>
                        </li>

                        <li>
                          <p><strong>truncate\_strings</strong> – If set to <span className="em">true</span>, any strings which are too long for their charN string fields will be truncated to fit. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>use\_expressions\_in\_new\_values\_maps</strong> – When set to <span className="em">true</span>, all new values in input parameter <span className="em">new\_values\_maps</span> are considered as expression values. When set to <span className="em">false</span>, all new values in input parameter <span className="em">new\_values\_maps</span> are considered as constants. NOTE: When <span className="em">true</span>, string constants will need to be quoted to avoid being evaluated as expressions. Allowed values are:</p>

                          <ul className="simple">
                            <li>
                              <p>true</p>
                            </li>

                            <li>
                              <p>false</p>
                            </li>
                          </ul>

                          <p>The default value is ‘false’.</p>
                        </li>

                        <li>
                          <p><strong>record\_id</strong> – ID of a single record to be updated (returned in the call to <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.insert_records" title="gpudb.GPUdb.insert_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.insert\_records()</span></code></a> or <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb.get_records_from_collection" title="gpudb.GPUdb.get_records_from_collection"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.get\_records\_from\_collection()</span></code></a>).</p>
                        </li>
                      </ul>

                      <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
                    </div>
                  </div>
                </div>
              </blockquote>

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

              <blockquote>
                <div>
                  <p>The response from the server which is a dict containing the –</p>
                  <p>following entries–</p>

                  <div className="dl simple">
                    <div className="dt">count\_updated (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Total number of records updated.</p>
                    </div>

                    <div className="dt">counts\_updated (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>Total number of records updated per predicate in input parameter <span className="em">expressions</span>.</p>
                    </div>

                    <div className="dt">count\_inserted (<span className="em">long</span>) –</div>

                    <div className="dd">
                      <p>Total number of records inserted (due to expressions not matching any existing records).</p>
                    </div>

                    <div className="dt">counts\_inserted (<span className="em">list of longs</span>) –</div>

                    <div className="dd">
                      <p>Total number of records inserted per predicate in input parameter <span className="em">expressions</span> (will be either 0 or 1 for each expression).</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>
              </blockquote>

              <p><strong>Raises</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">GPUdbException – –</div>

                    <div className="dd">
                      <p>Upon an error from the server.</p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
