Skip to main content
Import CSV data into a functional attribute and update the parameters and header units.

Import required libraries

Connect to MI and specify a table.

Create a new record to store your data

Define names for a new record, and an attribute on that record.
Create the new Record object.
Previous cell output:
Get the unpopulated functional attribute for the new record, so we can populate it.
Previous cell output:

Import test data

The tensile test data to import is stored in example.csv. Read in each row of the CSV data, and add the data to the functional attribute point-by-point.
Access the func.value property to see the underlying data structure of the attribute represented as a list of lists. func.data shows all parameters supported by the attribute. Parameters that were not populated during the import have been set to None.
Previous cell output:
The example data uses Celsius for temperature, but the database default is Kelvin. Change the parameter unit before import to take account of this.
After changing the units, it is good practice to update the header units in func.data so that the units displayed in MI applications are correct.

Write your changes to MI

Previous cell output: