Skip to main content
Use various methods to get records from Granta MI. This notebook shows three methods of browsing for records in Granta MI:
  • Get records by internal Granta MI identifier
  • Get records by an exact match on a short text attribute value
  • Get records by navigating the tree structure

Connect to MI

Access a record by specifying an internal ID

Get a record with a specific identifier, for example history GUID.
Previous cell output:

Access a record by specifying a unique short text value

Get a record with a unique short-text attribute value using the Table.get_record_by_lookup_value() method.
Previous cell output:

Browse for records by navigating the tree structure

The following examples show two methods of browsing the Granta MI tree structure in Python. These examples use the MaterialUniverse table.

Iterative browsing

Browse iteratively by getting the immediate children of each record in turn. First, get the top-level folders of the table with the Table.children property:
Previous cell output:
Then filter for a specific folder and access the Record.children property to find its children:
Previous cell output:
Repeat the process to navigate the tree structure until you reach your records of interest.
Previous cell output:

Access a tree location directly

The table.get_records_from_path() method returns all the records at the end of a specified path. It accepts wildcards at any level. Get all records that are great-grandchildren of folders with the short name Ceramics and glasses and also have a parent with the short name Baryta.
Previous cell output:
Get all records that are great-grandchildren of the folder Ceramics and glasses.
Previous cell output:

Access all descendant records within a folder

Use the Record.get_descendants() method to retrieve all records that are a descendant of the specified record in a single step.
Previous cell output:
Print the results and whether the object is a record or folder.
Previous cell output: