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

# Bulk operators

### *class* AttributeFetcher

Bulk exporter for record data. Fetches data values for all named [`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition) and
[`PseudoAttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition) objects from the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects and [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table).

Set `attributes` to  `None` to export all record data.

A class method executes the data export, allowing the [`AttributeFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) to be edited post-creation.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch) to fetch attribute values in
bulk.

#### \_\_init\_\_(table, batch\_size=100, attributes=None, records=None, max\_parallel\_threads=6, include\_binary\_data=False)

* **Parameters:**
  * **table** – [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **batch\_size** – int (default value of 100)
  * **attributes** – Union\[List\[Union\[[`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)]], List\[str]]
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
  * **include\_binary\_data** – bool (default value of False)
* **Returns:**
  None

#### *property* records

List of records to be fetched (exported).

* **Returns:**
  List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### *property* attribute\_list

List of attributes for which data will be fetched (exported).

* **Returns:**
  List\[Union\[[`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition), [`PseudoAttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.PseudoAttributeDefinition)]]

#### fetch\_attribute\_data(parallelise=False)

Fetch the attribute data for the provided records and attributes, and populate the corresponding
[`AttributeValue`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-values#GRANTA_MIScriptingToolkit.granta.mi_attribute_value_classes.AttributeValue) objects for each record.

* **Parameters:**
  **parallelise** – bool
* **Returns:**
  None

### *class* AssociatedRecordFetcher

Bulk fetcher for associated records. Fetches all [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects via association chains from the specified
[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects in the target [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). Provides means to choose the direction that association chains
are followed, and to specify a list of tabular attributes which are chained together.

This operation performs no subset filtering.

A class method executes the fetch, allowing the [`AssociatedRecordFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AssociatedRecordFetcher) to be edited post-creation.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch_associated_records()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_associated_records) to fetch
associated records in bulk.

#### \_\_init\_\_(table, records, target\_table, link\_direction='Both', attribute\_path=None, batch\_size=100)

* **Parameters:**
  * **table** – [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **target\_table** – [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table)
  * **link\_direction** – str (`Both`, `Forward`, `Reverse`)
  * **attribute\_path** – List\[[`AttributeDefinition`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/attribute-definitions#GRANTA_MIScriptingToolkit.granta.mi_attribute_classes.AttributeDefinition)]
  * **batch\_size** – int (default value of 100)
* **Returns:**
  None

#### fetch\_associated\_records(parallelise=False, max\_parallel\_threads=6)

Fetch the associated records in the specified [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) from the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects. Return
a list of dictionaries with `source_record` and `associated_records` fields for each provided
[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record).

This operation performs no subset filtering.

* **Parameters:**
  * **parallelise** – [`bool`](https://docs.python.org/3/library/functions.html#bool)
  * **max\_parallel\_threads** – [`int`](https://docs.python.org/3/library/functions.html#int) (default 6)
* **Returns:**
  List\[Dict\[str, Union\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record), List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]]]]

### *class* LinkFetcher

Bulk record link fetcher (exporter). Fetches and populates record link groups for the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)
objects in the specified [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table). Set `link_groups` to `None` to fetch all record link groups.

Set `filter_subsets` to `True` to return records that are in the default subsets of the target table.
Set it to `False` to search with no filtering by subset.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_link_fetch()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_link_fetch) to fetch links in bulk.

#### \_\_init\_\_(table, batch\_size=100, records=None, link\_groups=None, filter\_subsets=True)

* **Parameters:**
  * **table** – [`Table`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table) object
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **link\_groups** – List\[str]
  * **filter\_subsets** – bool (default value of True)
* **Returns:**
  None

#### *property* link\_groups

List of link groups to export.

* **Returns:**
  List\[str]

#### *property* records

List of records to fetch link groups for.

* **Returns:**
  List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### fetch\_linked\_records(parallelise=False, max\_parallel\_threads=6)

Perform the bulk fetch (export). Batches Service Layer calls into efficient blocks, then populates
[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) object pseudo-attributes.

* **Parameters:**
  * **parallelise** – bool
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

### *class* ReleaseStateFetcher

Allows record release states to be fetched from the server in bulk.

The list of [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects, batch size, and number of threads in parallel can be edited post-creation.

A class method fetches the release states and populates the relevant [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) properties.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Session.bulk_fetch_release_states()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/session#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_fetch_release_states) to fetch
release states in bulk.

#### \_\_init\_\_(session, records, batch\_size=100, max\_parallel\_threads=6)

* **Parameters:**
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

#### *property* records

List of [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects to be processed.

* **Returns:**
  List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### fetch\_release\_states(parallelise=False)

Fetches the release states of the specified [`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects from the server, and populates their
relevant properties.

* **Parameters:**
  **parallelise** – bool (splits operation into multiple threads if set to `True`)
* **Returns:**
  None

### *class* BulkRecordDeleterWithdrawer

Allows for bulk deletion or withdrawal or records from the server. Records are withdrawn from
version-controlled tables, otherwise they are deleted.

The deletion/withdrawal is performed by a method on the class; as such, the list of
[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record) objects for deletion, batch size, and number of threads in parallel can be edited post-creation.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Session.bulk_delete_or_withdraw_records()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/session#GRANTA_MIScriptingToolkit.granta.mi.Session.bulk_delete_or_withdraw_records) to
delete and withdraw records in bulk.

#### \_\_init\_\_(session, records, batch\_size=100, max\_parallel\_threads=6, withdrawal\_notes=None)

* **Parameters:**
  * **session** – [`Session`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/session#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **batch\_size** – int (default value of 100)
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **max\_parallel\_threads** – int (default value of 6)
  * **withdrawal\_notes** – Optional\[str]
* **Returns:**
  None

#### *property* records

List of records to be deleted or withdrawn.

* **Returns:**
  List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]

#### delete\_or\_withdraw(parallelise=False)

Performs the deletion (or withdrawal, if the records are in a version-controlled table).

* **Parameters:**
  **parallelise** – bool (splits operation into multiple threads if `True`)
* **Returns:**
  None

### *class* DataRevisionHistoryFetcher

Bulk exporter for data revision history.

Fetches the data revision history for all attributes of the provided records and populates the
[`Record.data_revision_history`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property.

See [`AttributeFetcher`](#GRANTA_MIScriptingToolkit.granta.mi_bulk_utilities.AttributeFetcher) to export attribute data.

#### Deprecated

Deprecated since version 4.2: This class will be made private in a future release. Use [`Table.bulk_fetch_data_revision_history()`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/table#GRANTA_MIScriptingToolkit.granta.mi_tree_classes.Table.bulk_fetch_data_revision_history) to fetch
data revision history in bulk.

#### \_\_init\_\_(\_mi, records, batch\_size=100, max\_parallel\_threads=6)

* **Parameters:**
  * **\_mi** – [`Session`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/session#GRANTA_MIScriptingToolkit.granta.mi.Session) object
  * **records** – List\[[`Record`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record)]
  * **batch\_size** – int (default value of 100)
  * **max\_parallel\_threads** – int (default value of 6)
* **Returns:**
  None

#### fetch\_data\_revision\_history(parallelise=False)

Fetches the data revision history for all attributes of the provided records and populates the
[`Record.data_revision_history`](https://developer.synopsys.com/docs/granta-mi/granta-mi-scripting-toolkit/4-2/api/record#GRANTA_MIScriptingToolkit.granta.mi_record_classes.Record.data_revision_history) property.

* **Parameters:**
  **parallelise** – bool
