Skip to main content
Edit and compare tabular data using the Python numpy library. In this example, there is some existing tensile data for a material (AMS 6520, Plate, 1000°F). Some of that data is of particular interest and we want to separate it from the old data and put it in a record of its own.

Connect to MI

Specify a database and table.

Locate existing data

Find the record and attribute that contains the original data.
Select some samples of interest.
Get their Record objects from the tabular attribute containing the tensile test data.
Get their row indices in the tabular data structure.

Extract and analyse the data

Extract the sample data, and establish how different these particular samples are from the remainder of the set.
Previous cell output:
Previous cell output:

Create a new record and tabular attribute

Create a new record for your data of interest.
Select the tabular attribute to write to.
Previous cell output:
Link the samples to the new tabular datum.
Previous cell output:
Set the new tabular attribute to update, and write the new record to MI.
The original record is linked to the records you just linked to the tabular data. Link the new record to the original, too. (Records must exist on the server to be linked together, which means the record must be pushed to the server before it can be linked to other records.)
Previous cell output:
Like changes to data, changes to links also need to be pushed to the server. Unlike attributes, links do not need to be flagged for update (there is no equivalent to set_attributes() for links).
Previous cell output: