> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Table

### *class* Table

Represents an MI table, and provides access to records (particularly searching on record properties),
exporters and attribute definitions.

### Notes

Do not create instances of this class; it represents a pre-existing database structure. Use
[`Database.get_table()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.get_table) or [`Database.get_table_by_guid()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.get_table_by_guid) to access an instance of this class.

#### add\_subsets(values)

Adds single or multiple subsets to the list of subsets currently applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object.

* **Parameters:**
  **values** ([*set*](https://docs.python.org/3/library/stdtypes.html#set) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*list*](https://docs.python.org/3/library/stdtypes.html#list) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Subset name(s) to add.

### Notes

Makes a Service Layer call if the available subsets have not already been fetched.

#### all\_records(include\_folders=False, include\_generics=True, filter\_by\_subset=True, subset\_name=None)

Returns a flattened list of all records in the table and populates each [`Record.children`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.children) property.

If `filter_by_subset` is True then the operation will only return records that are in the subset given in
`subset_name`, if no value is provided then the subset specified on the table will be used.

If `filter_by_subset` is False then records will be returned from all subsets.

* **Parameters:**
  * **include\_folders** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to include folders in the results.
  * **include\_generics** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to include generics in the results.
  * **filter\_by\_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset.
  * **subset\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering. If not specified, uses the currently applied subset.
* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]
* **Raises:**
  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name`
  is not provided.

### Notes

Makes a Service Layer call.

#### bulk\_fetch(records, attributes=None, batch\_size=100, parallelize=False, max\_num\_threads=6, include\_binary\_data=False)

Populate attribute and pseudo-attribute values for multiple records in a single operation.

Populates data values for all named [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) and [`PseudoAttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) objects in
the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects. Attribute values for requested `attributes` are added to
[`Record.attributes`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.attributes) dictionary whether the attribute is populated or not.

Meta-attributes can be included in a bulk operation by providing the meta-attribute [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)
in `attributes`. [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) of meta-attributes can be obtained from the parent attribute
[`AttributeDefinition.meta_attributes`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition.meta_attributes).

Attribute values will not be created for attributes not included in the export via the attributes argument and
trying to access them might raise a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError).

#### Versionchanged

Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`.

* **Parameters:**
  * **records** (list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch data for.
  * **attributes** (list\[[`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or [`PseudoAttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.PseudoAttributeDefinition) or str], optional) – List of attributes to fetch. Set to [`None`](https://docs.python.org/3/library/constants.html#None) to export all record data.
  * **batch\_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch.
  * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation.
  * **max\_num\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing.
  * **include\_binary\_data** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to include binary data in the fetch.
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server.

### Notes

Makes Service Layer calls to fetch attribute data in batches.

Providing a list of attributes by name or by [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) will not fetch any meta-attributes
associated with those attributes. If the meta-attributes are not explicitly requested, then the resulting
[`AttributeValue.meta_attributes`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeValue.meta_attributes) dictionary will contain empty meta-attribute values.

If `include_binary_data` is set to [`False`](https://docs.python.org/3/library/constants.html#False) (default), the export will not fetch the binary data
for the requested File and Picture attributes and tabular columns. Instead, the export will export URLs
(see [`BinaryType.url`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) for more information about using the URL to access the data). URLs should be used
for large files and pictures, or if the binary data itself is not required. However, as no data is fetched,
accessing the `binary_data` property and `save()` method will raise a `ValueError`.

On-demand access to attribute values without using [`Table.bulk_fetch()`](#ansys.grantami.core.mi_tree_classes.Table.bulk_fetch) always fetches binary data.

To summarize how the file and picture data can be accessed:

* `include_binary_data = False` (default): The [`BinaryType.url`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is populated.
* `include_binary_data = True`: The [`BinaryType.binary_data`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) property, and
  [`AttributeFile.save()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeFile.save) and [`AttributePicture.save()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributePicture.save) methods are both available to access and save
  the binary data. The [`BinaryType.url`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.url) property is empty and returns [`None`](https://docs.python.org/3/library/constants.html#None).

This operation performs no subset filtering, so all tabular rows will be included in the response
regardless of the subset membership of the linked records.

#### WARNING

`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See
[OIDC and parallel operation](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/release_notes/known_issues.md#oidc-known-issue) for more details.

If `include_binary_data` is set to [`False`](https://docs.python.org/3/library/constants.html#False):

* [`BinaryType.binary_data`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.binary_data) and [`BinaryType.save()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_attribute_value_classes.BinaryType.save) raise a `ValueError`.
* Calling [`AttributeTabular.enable_destructive_editing()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeTabular.enable_destructive_editing) on a tabular attribute value with unexported
  binary data emits a [`UserWarning`](https://docs.python.org/3/library/exceptions.html#UserWarning).
* Proceeding to make destructive changes on a tabular attribute which unexported binary data raises a
  [`UnexportedBinaryDataError`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions#ansys.grantami.core.mi_meta_classes.UnexportedBinaryDataError) on re-import.
* Modifying the [`LocalFileValue.file_name`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/tabular#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.file_name) or [`LocalFileValue.description`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/tabular#ansys.grantami.core._mi_tabular_value_classes.LocalFileValue.description) properties for a cell
  with unexported binary without adding new binary data raises a `ValueError` on re-import.

### Examples

The following code snippet shows how to include meta-attributes and pseudo-attributes in a `bulk_fetch`
request:

```python theme={null}
table = db.get_table("MaterialUniverse")
attribute_names = ["Density", "Price", "Young's modulus"]
print("Fetch three attributes by name")
table.bulk_fetch(records, attributes=attribute_names)

attribute_definitions = [table.attributes[name] for name in attribute_names]
print("Fetch three attributes by AttributeDefinition")
table.bulk_fetch(records, attributes=attribute_definitions)

attr_and_meta_definitions = attribute_definitions + [meta_attr
                                                     for attr in attribute_definitions
                                                     for meta_attr in attr.meta_attributes.values()]
print("Fetch three attributes and their meta-attributes")
table.bulk_fetch(records, attributes=attr_and_meta_definitions)

attr_meta_and_pseudo_definitions = attr_and_meta_definitions + mpy.RecordProperties.all()
print("Fetch three attributes, their meta-attributes, and all pseudo-attributes")
table.bulk_fetch(records, attributes=attr_meta_and_pseudo_definitions)
```

#### bulk\_fetch\_all\_record\_versions(records, batch\_size=100, parallelize=False, max\_num\_threads=6)

Fetches all record versions for all provided records.

Populates the [`Record.all_versions`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.all_versions), [`Record.release_state`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.release_state), and [`Record.record_history`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.record_history)
properties of the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects.

* **Parameters:**
  * **records** (list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch versions for.
  * **batch\_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch.
  * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation.
  * **max\_num\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing.

#### WARNING

`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See
[OIDC and parallel operation](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/release_notes/known_issues.md#oidc-known-issue) for more details.

#### SEE ALSO

[`Session.bulk_fetch_release_states()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/session#ansys.grantami.core.mi.Session.bulk_fetch_release_states)
: Fetches [`Record.release_state`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.release_state) only.

### Notes

Makes Service Layer calls to fetch record versions in batches.

This operation performs multiple requests per batch. As a result, the batch size should be considered a relative
scale factor to control performance vs load on the Granta MI server, and is not an exact statement of the
number of records included in each request.

#### bulk\_fetch\_associated\_records(records, target\_table, link\_direction='Both', attribute\_path=None, batch\_size=100, parallelize=False, max\_num\_threads=6)

Fetches records associated with the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects from a target [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

Returns a list of dictionaries containing the source record and associated records for each [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)
provided.

You may specify `link_direction` to only follow tabular links in the specified direction, or provide a list of
[`AttributeDefinitionTabular`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular) objects in `attribute_path` to follow only those tabular links.

#### Versionchanged

Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`.

* **Parameters:**
  * **records** (list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]) – List of source records.
  * **target\_table** ([`Table`](#ansys.grantami.core.mi_tree_classes.Table)) – Target table to fetch associated records from.
  * **link\_direction** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *default: "Both"*) – Direction of links to follow: `Both`, `Forward`, or `Reverse`.
  * **attribute\_path** (list\[[`AttributeDefinitionTabular`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionTabular)], optional) – List of tabular attributes to follow.
  * **batch\_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch.
  * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation.
  * **max\_num\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing.
* **Return type:**
  list\[dict\[str, [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) | list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]]]
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server.

#### WARNING

`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See
[OIDC and parallel operation](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/release_notes/known_issues.md#oidc-known-issue) for more details.

### Notes

Makes Service Layer calls to fetch associated records in batches.

#### bulk\_fetch\_data\_revision\_history(records, batch\_size=100, parallelize=False, max\_num\_threads=6)

Fetches the data revision history for all attributes of the provided records.

Populates the [`Record.data_revision_history`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.data_revision_history) property.

#### Versionchanged

Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`.

* **Parameters:**
  * **records** (list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch data revision history for.
  * **batch\_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch.
  * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation.
  * **max\_num\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing.
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server.

#### WARNING

`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See
[OIDC and parallel operation](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/release_notes/known_issues.md#oidc-known-issue) for more details.

### Notes

Makes Service Layer calls to fetch data revision history in batches.

#### bulk\_link\_fetch(records, link\_groups=None, batch\_size=100, parallelize=False, max\_num\_threads=6, filter\_subsets=True)

Fetches and populates record link groups for the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects.

#### Versionchanged

Changed in version 4.2: Argument `parallelise` was renamed to `parallelize`.

* **Parameters:**
  * **records** (list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]) – List of records to fetch links for.
  * **link\_groups** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – List of link group names to fetch. Set to [`None`](https://docs.python.org/3/library/constants.html#None) to fetch all.
  * **batch\_size** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 100*) – Number of records to process in each batch.
  * **parallelize** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to parallelize the fetch operation.
  * **max\_num\_threads** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *default: 6*) – Maximum number of threads to use when parallelizing.
  * **filter\_subsets** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter by subsets. If [`True`](https://docs.python.org/3/library/constants.html#True), only linked records in the default subset of their table are
    returned. If [`False`](https://docs.python.org/3/library/constants.html#False), linked records are returned from all subsets.
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more records have not been pushed to the server.

#### WARNING

`parallelize` should not be set to [`True`](https://docs.python.org/3/library/constants.html#True) when using long-running sessions authenticated via OIDC. See
[OIDC and parallel operation](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/release_notes/known_issues.md#oidc-known-issue) for more details.

### Notes

Makes Service Layer calls to fetch links in batches.

#### create\_empty\_attribute\_value(definition)

Create an empty [`AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeValue) instance for an attribute.

This can subsequently be assigned to a record for import.

* **Parameters:**
  **definition** ([`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)) – Attribute definition object.
* **Return type:**
  [`AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)

#### create\_record(name, parent=None, short\_name=None, attributes=None, folder=False, subsets=None, release\_record=False, color=RecordColor.InheritFromParent)

Creates a new [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) object in the [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

The record will not exist in Granta MI or be assignable as a parent until it is pushed to the server.

* **Parameters:**
  * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Long name of the record.
  * **parent** ([`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) or [`Table`](#ansys.grantami.core.mi_tree_classes.Table), optional) – Parent record or table.
  * **short\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Short name of the record.
  * **attributes** (dict\[str, [`AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-values#ansys.grantami.core.mi_attribute_value_classes.AttributeValue)], optional) – Dictionary of attribute values.
  * **folder** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – If true, the record will be created as a folder.
  * **subsets** ([*set*](https://docs.python.org/3/library/stdtypes.html#set) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]* *,* *optional*) – List of subsets the record will belong to. If not specified, record will be added to the currently active
    subset(s) on the table.
  * **release\_record** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether the record will be released when pushed to the server.
  * **color** ([`RecordColor`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/constants#ansys.grantami.core.mi_constants.RecordColor), default: RecordColor.InheritFromParent) – Record color. If not specified, inherits from parent.
* **Return type:**
  [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)

#### get\_attribute\_definition(name=None, identity=None)

Returns the [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) object specified by `name` or the identifier `identity`.

Meta-attributes are also returned if the identifier is provided.

* **Parameters:**
  * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) object.
  * **identity** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Attribute identifier.
* **Return type:**
  [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition) or list\[[`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)]

#### get\_available\_exporters(package=None, model=None, applicability\_tag=None)

Returns exporters available on the table filtered by package, model, and applicability tag value.

* **Parameters:**
  * **package** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – The target FEA analysis package. For example: ‘NX 10.0’, ‘CATIA V5’.
  * **model** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – The material model type. For example, ‘Isotropic’, ‘Linear, temperature-independent,
    isotropic, thermal, plastic’.
  * **applicability\_tag** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – A tag that identifies the applications for which an exporter is intended to be used.
    For example, ‘MIMaterialsGateway’, ‘MIViewer’.
* **Return type:**
  list\[[`Exporter`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_exporters.Exporter)]

### Notes

Makes a Service Layer call on first request for each applicability tag.

#### get\_record\_by\_id(history\_identity=None, hguid=None, vguid=None, version\_number=None)

Returns the [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) object with the following (sets of) references in priority order.

1. `vguid` (record version GUID): Uniquely identifies specific version of record.
2. `history_identity` (record history identity): Uniquely identifies record only, and optionally
   `version_number` (record version number).
3. `hguid` (record history GUID): Uniquely identifies record only.

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

This method can return records outside the currently selected subset.

* **Parameters:**
  * **history\_identity** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record history identity.
  * **hguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record history GUID: uniquely identifies record.
  * **vguid** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Record version GUID: uniquely identifies record version.
  * **version\_number** ([*int*](https://docs.python.org/3/library/functions.html#int) *,* *optional*) – Record version number.
* **Returns:**
  Record object or [`None`](https://docs.python.org/3/library/constants.html#None) if not found.
* **Return type:**
  [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)

### Notes

Makes a Service Layer call.

#### get\_record\_by\_lookup\_value(attribute\_name, lookup\_value)

Returns a [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) object specified by attribute name and an exact match for a short text string.

Provided that:

* The `lookup_value` matches exactly one record in the table.

* The record is in the default subset of the table.

* **Parameters:**
  * **attribute\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name of the attribute to search.
  * **lookup\_value** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Short text string value to match.

* **Returns:**
  Record object or [`None`](https://docs.python.org/3/library/constants.html#None) if not found.

* **Return type:**
  [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)

### Notes

Makes a Service Layer call.

In Granta MI 2025 R2 and later, if multiple matches are detected, no results are returned. In earlier Granta MI
versions, an exception is raised.

#### get\_records\_by\_ids(record\_identifiers)

Returns a [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) object for each identifier provided.

The returned list of records will have the same number of elements as the provided list of identifiers.
If no record corresponds to that identifier in this table then the corresponding item in the returned list
will be [`None`](https://docs.python.org/3/library/constants.html#None).

Each element in the `record_identifiers` parameter should be a dictionary with one or more of the
following (sets of) references in priority order:

1. `vguid` (record version GUID): Uniquely identifies specific version of record.
2. `history_identity` (record history identity): Uniquely identifies record only, and optionally
   `version_number` (record version number).
3. `hguid` (record history GUID): Uniquely identifies record only.

If `vguid` or `version_number` are not provided for version controlled records, this method will
return the latest available version of the record available to the user. The latest available version
is dependent on the user’s Granta MI permissions.

This method can return records outside the currently selected subset.

* **Parameters:**
  **record\_identifiers** (*Sequence* *\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* [*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* [*int*](https://docs.python.org/3/library/functions.html#int) *]* *]*) – Sequence of dictionaries containing record identifiers.
* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) | [`None`](https://docs.python.org/3/library/constants.html#None)]

### Notes

Makes multiple Service Layer calls depending on number of identifiers provided.

#### get\_records\_from\_path(starting\_node, tree\_path, use\_short\_names=False)

Return all records at the end of the provided path from a specified node.

* The starting node identifies the node immediately above the path. To start the path at the top of the tree,
  set `starting_node` to [`None`](https://docs.python.org/3/library/constants.html#None). To start the path under any other node in the tree,
  specify a [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) as the `starting_node`.

* Specify the path as a list of record names e.g. `['Polymers', 'Plastics', 'Thermoplastics', ...]`.

* You can include “wildcards” in the path by setting a node to [`None`](https://docs.python.org/3/library/constants.html#None) e.g.
  `['Thermoplastics', :obj:`None`, 'Unfilled', ...]`.

* By default, the strings specified in the path list are assumed to be record full names; to specify the path
  using record short names instead, set `use_short_names` to True.

* **Parameters:**
  * **starting\_node** ([`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)) – Any Record in the table tree. To start the path at the root node of the table tree, set to [`None`](https://docs.python.org/3/library/constants.html#None).
  * **tree\_path** (list\[str or [`None`](https://docs.python.org/3/library/constants.html#None)]) – A list of strings specifying the names of the records in the path. May include [`None`](https://docs.python.org/3/library/constants.html#None) as a wildcard.
  * **use\_short\_names** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether the strings in the path are the record short names.

* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]

* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If the starting node has not been pushed to the server.

### Notes

Makes multiple Service Layer calls.

### Examples

Example 1:

`recs = table.get_records_from_path(None, ['Record 1', None, 'Record 2'])`

will return all records that are children of a record named Record 2, that also have Record 1 as a
great-grandparent. The grandparent is set as a wildcard, and so any is allowed.

Example 2:

`recs = table.get_records_from_path(None, ['Record 1', 'Record 3', None])`

will return all records that are grandchildren of records named Record 3 that also have a great-grandparent
called Record 1.

Both of these examples have assumed that Record 1 is a top-level record (and have a starting node as a table
object to reflect this), but the method does not require this. The starting node can be any record object in
the tree.

#### path\_from(starting\_node, tree\_path, color=RecordColor.InheritFromParent)

Ensures that all the folders in a specified path are available, and creates any that do not already exist.

In the case of a version-controlled table, folders are created in an unreleased state.

* **Parameters:**
  * **starting\_node** ([`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) or [`None`](https://docs.python.org/3/library/constants.html#None)) – Identifies the node under which the new path will start. Set to [`None`](https://docs.python.org/3/library/constants.html#None) to start the path at the root
    of the table. Set to an existing record/folder to create the path from the specified node.
  * **tree\_path** ([*list*](https://docs.python.org/3/library/stdtypes.html#list) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – The names of the folders in the path, e.g. `['Polymers', 'Plastics', 'Thermoplastics', ...]`.
    Folders in the path will be created if they don’t already exist. Existing records on the path will be
    converted to generic records.
  * **color** ([`RecordColor`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/constants#ansys.grantami.core.mi_constants.RecordColor), default: RecordColor.InheritFromParent) – Sets the color of all folders and records in the path.
* **Returns:**
  The Record object representing the last folder in the path.
* **Return type:**
  [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more start nodes has not been pushed to the server.

### Notes

Makes a Service Layer call.

#### paths\_from(paths)

Create multiple paths between specified start and end nodes in the table tree.

See description of [`path_from()`](#ansys.grantami.core.mi_tree_classes.Table.path_from) for further details.

* **Parameters:**
  **paths** (list\[dict\[str, [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) | [`None`](https://docs.python.org/3/library/constants.html#None) | [`RecordColor`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/constants#ansys.grantami.core.mi_constants.RecordColor) | list\[str]]]) – List of path specifications.
* **Return type:**
  list\[tuple\[dict, [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]]
* **Raises:**
  [**InvalidRecordStateError**](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/exceptions.md#ansys.grantami.core.mi_meta_classes.InvalidRecordStateError) – If one or more start nodes has not been pushed to the server.

### Examples

Paths are specified as a list of dictionaries with the following structure:

```python theme={null}
{'starting_node': Optional[Record],
'tree_path': ['list', 'of', 'folders'],
'color': 'color for all new nodes to be assigned'}
```

### Notes

Makes a Service Layer call.

#### refetch\_children(filter\_by\_subset=True, subset\_name=None)

Refreshes the list of direct children belonging to the table.

If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) then the operation will only return records that are in the subset given
in `subset_name`, if no value is provided then the subset specified on the table will be used.

If `filter_by_subset` is [`False`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets.

* **Parameters:**
  * **filter\_by\_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset.
  * **subset\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering.
* **Raises:**
  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name`
  is not provided.

### Notes

Makes a Service Layer call.

#### refresh\_attributes()

Performs a Foundation API [`BrowseService.get_attribute_details()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/foundation_api#ansys.grantami.backend.soap.BrowseService.BrowseService.get_attribute_details) request and creates a new set of
attributes.

This method only updates the details of existing attributes. To update the list of available attributes, use
[`Database.refresh_tables()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.refresh_tables).

### Notes

Makes a Service Layer call.

#### refresh\_subsets()

Fetches the list of subsets which can be applied to this table.

### Notes

Makes a Service Layer call.

#### remove\_subsets(values)

Removes single or multiple subsets from the list of subsets currently associated with the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object.

* **Parameters:**
  **values** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *or* [*list*](https://docs.python.org/3/library/stdtypes.html#list) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *] or* [*set*](https://docs.python.org/3/library/stdtypes.html#set) *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – Subset name(s) to remove.

#### reset\_display\_unit(attribute)

Resets the display unit for a `POIN` or `RNGE` attribute back to the unit system default.

* **Parameters:**
  **attribute** (str or [`AttributeDefinitionPoint`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) or [`AttributeDefinitionRange`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange)) – Attribute name or attribute definition object.

#### search\_for\_records\_by\_name(name, filter\_by\_subset=True, subset\_name=None)

Performs a search on record name within the table.

Returns only the [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects whose short or long names are an exact match for `name`.

If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) then the search will only return records that are in the subset given
in `subset_name`, if no value is provided then the subset specified on the table will be used.

If `filter_by_subset` is [`False`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets.

This method is case-insensitive.

* **Parameters:**
  * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Name to search for.
  * **filter\_by\_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset.
  * **subset\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering.
* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]
* **Raises:**
  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name`
  is not provided.

### Notes

Use [`Database.search_for_records_by_name()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_name) to search across the whole database.

Makes a Service Layer call.

#### search\_for\_records\_by\_text(text, filter\_by\_subset=True, subset\_name=None)

Performs a simple text search within the table for the specified string.

Returns a list of matching [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record) objects.

If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) then the search will only return records that are in the subset given in
`subset_name`, if no value is provided then the subset specified on the table will be used.

If `filter_by_subset` is [`False`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets.

* **Parameters:**
  * **text** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Text string to search for.
  * **filter\_by\_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset.
  * **subset\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering.
* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]
* **Raises:**
  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name`
  is not provided.

#### SEE ALSO

[`Database.search_for_records_by_text()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.search_for_records_by_text)
: Searches for records across the whole database.

### Notes

Makes a Service Layer call.

#### search\_for\_records\_where(list\_of\_criteria, silent=False, filter\_by\_subset=True, subset\_name=None)

Performs a search using criteria within the table.

Use [`Database.search_for_records_where()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database.search_for_records_where) to search across the whole database.

The provided `list_of_criteria` must only comprise criteria defined against attributes in this table or
criteria defined against pseudo-attributes. If it includes any criteria defined against attributes of another
table, a [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) is raised.

If `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) then the search will only return records that are in the subset given in
`subset_name`, if no value is provided then the subset specified on the table will be used.

If `filter_by_subset` is [`False`](https://docs.python.org/3/library/constants.html#False) then records will be returned from all subsets.

* **Parameters:**
  * **list\_of\_criteria** (list\[[`SearchCriterion`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_meta_classes.SearchCriterion)]) – List of search criteria to apply.
  * **silent** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: False*) – Whether to ignore errors caused by non-existent attributes.
  * **filter\_by\_subset** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *,* *default: True*) – Whether to filter records by subset.
  * **subset\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *optional*) – Name of the subset to use for filtering.
* **Returns:**
  A list of Record objects that match the provided criteria.
* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]
* **Raises:**
  * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the table when `filter_by_subset` is [`True`](https://docs.python.org/3/library/constants.html#True) and `subset_name`
    is not provided.
  * [**KeyError**](https://docs.python.org/3/library/exceptions.html#KeyError) – If the search criteria include an attribute that does not exist in the table and `silent` is [`False`](https://docs.python.org/3/library/constants.html#False).

### Notes

Makes a Service Layer call.

Tabular column criteria are aggregated by column name when processed server-side, effectively restricting
results to records where a single row must meet all criteria on the same column.

To perform a search with multiple tabular column criteria defined on the same column, and obtain results
where the criteria can be met by individual different rows, perform individual searches for each criterion
and compute the intersection of the resulting lists of records.

#### set\_display\_unit(attribute, unit\_symbol)

Sets the display unit for `POIN` and `RNGE` attributes (not used for import or FEA exporters).

* **Parameters:**
  * **attribute** (str or [`AttributeDefinitionPoint`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionPoint) or [`AttributeDefinitionRange`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinitionRange)) – Attribute name or attribute definition object.
  * **unit\_symbol** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – Unit symbol to set as the display unit.

### Notes

Units that include a currency can only be set with the abstract `currency` unit. This will cause the
attribute to be returned with the Database Currency. For example instead of `USD/kg` use  `currency/kg`.

#### *property* attributes *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [AttributeDefinition](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions.md#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)]*

All attributes included in the table schema, indexed by name.

Meta-attributes are accessible through the `meta_attributes` property of their parent attribute.

* **Return type:**
  dict\[str, [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/attribute-definitions#ansys.grantami.core.mi_attribute_classes.AttributeDefinition)]

### Notes

Makes a Service Layer call if the layouts have not already been fetched.

#### *property* children *: [List](https://docs.python.org/3/library/typing.html#typing.List)\[[Record](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record.md#ansys.grantami.core.mi_record_classes.Record)]*

Return the children of the Table node.

Analogous to [`Record.children`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record.children), this returns all the records one level from the Table root.

Records returned by this property may have been cached from previous calls to [`Table.refetch_children()`](#ansys.grantami.core.mi_tree_classes.Table.refetch_children) or
[`Table.all_records()`](#ansys.grantami.core.mi_tree_classes.Table.all_records), which apply subset filtering. If the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) subset configuration has
since been updated, refresh the list of children via one of the methods listed.

If there is no cached list of children, children are dynamically fetched on property access via
[`refetch_children()`](#ansys.grantami.core.mi_tree_classes.Table.refetch_children). The default subset filtering behavior is applied.

* **Return type:**
  list\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/record#ansys.grantami.core.mi_record_classes.Record)]
* **Raises:**
  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If more than one subset is applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

### Notes

Makes a Service Layer call if the children have not already been fetched.

#### *property* database *: [Database](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database.md#ansys.grantami.core.mi_tree_classes.Database)*

[`Database`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database) in which the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) is defined.

* **Returns:**
  Database object.
* **Return type:**
  [`Database`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/database#ansys.grantami.core.mi_tree_classes.Database)

#### *property* db\_key *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

Parent database key.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* default\_layout *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)*

Name of default layout for this [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

* **Return type:**
  str or [`None`](https://docs.python.org/3/library/constants.html#None)

### Notes

Makes a Service Layer call if the layouts have not already been fetched.

#### *property* default\_subset *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)*

The default subset for this [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str) or None

#### *property* guid *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

GUID of the table.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* layouts *: [Dict](https://docs.python.org/3/library/typing.html#typing.Dict)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [TableLayout](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting.md#ansys.grantami.core.mi_meta_classes.TableLayout)]*

Fetch and view the layouts available in this table.

* **Return type:**
  dict\[str, [`TableLayout`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/supporting#ansys.grantami.core.mi_meta_classes.TableLayout)]

### Notes

Makes a Service Layer call if the layouts have not already been fetched.

#### *property* mi *: [Session](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/session.md#ansys.grantami.core.mi.Session)*

MI Session that was used to create or access the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object.

Used for any Service Layer calls made by the [`Table`](#ansys.grantami.core.mi_tree_classes.Table).

* **Returns:**
  Session object.
* **Return type:**
  [`Session`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/streamlined_api/session#ansys.grantami.core.mi.Session)

#### *property* min\_max\_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

How table-wide minimum and maximum values of point, integer, range, and date-time attributes are calculated.

* [`None`](https://docs.python.org/3/library/constants.html#None): Does not calculate values (can improve performance when loading tables)
* `Approximate` (default): Uses a fast, approximate algorithm
* `Exact`: Takes account of current subset and permissions (can be slow on large tables)

Setting this property refetches cache extrema information for all attributes in the table.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

### Notes

Makes a Service Layer call.

#### *property* name *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

Name of the table.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* subsets *: [Set](https://docs.python.org/3/library/typing.html#typing.Set)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]*

Subsets that are currently applied to the [`Table`](#ansys.grantami.core.mi_tree_classes.Table) object.

Used for record creation, searching, and record fetching.

* **Return type:**
  [set](https://docs.python.org/3/library/stdtypes.html#set)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]

#### WARNING

If using any Table method which returns a list of records, such as a search method or
[`Table.all_records()`](#ansys.grantami.core.mi_tree_classes.Table.all_records), you must ensure that only one subset is currently applied to the table.
Otherwise, a `ValueError` will be raised by that method.

#### *property* subsets\_available *: [Set](https://docs.python.org/3/library/typing.html#typing.Set)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]*

Subsets which can be applied to this table.

* **Return type:**
  [set](https://docs.python.org/3/library/stdtypes.html#set)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]

### Notes

Makes a Service Layer call if the subsets have not already been fetched.

#### *property* unit\_system *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

Unit system currently in use.

* **Return type:**
  [str](https://docs.python.org/3/library/stdtypes.html#str)
