/InstanceSplit import

How to use /InstanceSplit and importing data with /Instancesplit ?

Written By Nikolas Ethoré (Super Administrator)

Updated at October 5th, 2022

If you do not get basic knowledge on instances, you can learn more on:

The flag /InstanceSplit enables you to tag a grid in which you can split data according to instances written in the table. When creating a grid with the flag /InstanceSplit added to your table name( #GridName /instancesplit), you should define in the first column instance keys from your workbook. You do not have to write every instance from your workbook. It depends on the model you wish to create.

The above grid called GridtoSplit is split according to instances you can find in the first column: TREATY01-SEC1, TREATY01-SEC2, TREATY02-SEC1, TREATY03-SEC2, and TREATY03-SEC3.

In Mind, the grid will be split according to these five instance keys as follows:

You can notice here that the grid is filtered according to instances written in the first column.

How to manage Import Manager to split instances in Mind

See this article: Input manager‍  to learn more about Input Manager.

Another method to split grids according to instances consists in defining at first your GridtoSplit table as input data. Then, in Mind, you will have the possibility to import any CSV file to update data from your GridtoSplit table according to instance keys.

You must execute the following steps to manage the import of data according to instances:

  • First, create a GridtoSplit table as input data with the flags /instancesplit and /input
  • After uploading your model in Mind, you will find the button "Input Manager" on the top left of your screen. Click on it, you will see a pop-up with your instance keys.
  • You can import a CSV file containing your instance keys by choosing the "Split" option (confer to the below picture). Browse a folder containing the CSV file by clicking on the "Browse file(s)" button. The "Split" option ables you to import data from one file to all your instance keys.

Thus, data from CSV files will be split according to your instance keys and finally, your GridtoSplit table will be updated by the import of these CSV files.

In the above example, you can notice that the five instance keys (on the left of the picture) from the GridtoSplit table have been updated successfully with data from a single file named "TestInstanceCSVpetitTS.csv" (on the right of the picture). Data from this CSV file have been split according to the five instance keys and refreshed into your GridtoSplit table.