Learn two ways to make sets of entity_set tables in Terra. Entity_set tables can be used as inputs for workflows that expect an array as input. Sets of entity_sets are useful if you want to run multiple workflows on the same subset of sets.
Note that you cannot create an entity_set_set table TSV outside Terra to upload to a workspace. Saving a subset of an entity_set table as a set (in the data page) or running a workflow are currently the only ways to make sets of sets.
Overview: When would you use sets of sets
If your workflow takes an array as input, you may use a set table as the root entity type. If you then wanted to run on a subset of these input sets, without having to manually select them every time, you would need a set_set table! See two examples below.
Example: sm-student-v3 table
The table student-v3 above (from the Data Tables Quickstart) includes separate rows for each student's grades in three subjects: language arts, math, and science.
Example: sm-student-v3_set table
Each member of the sm-student-v3_set table is one student - identified by their student ID. Each set contains the three rows in the sm-student-v3 table.
Example 1: contents of BZ460 set
If you then wanted to make a set of some of the students (a set of members of the sm-student-v3_set table), you would have a sm-student-v3_set_set table.
Example: sm-student-v3_set_set table
Option 1: Make a set_set table in the workspace data page
You can choose specific rows in your entity_set table to make a set right in the data page of your workspace.
1.1. Start in the root entity table (entity_set). Select the rows of sets to include in the set_set
1.2. Click on Edit (above the table) and select Save selection as set from the menu.
1.3. In the Create set pane, give the set a name and click Save.
1.4. You will see a new entity_set_set table with the sets you chose as members.
Video demonstration
Option 2: Make a set table by running a workflow
If you run a workflow on two or more entities (rows) in an entity table, Terra will automatically generate a set of those rows. If you run a workflow on an entity_set table (root entity type entity_set), Terra will generate an entity_set_set table.
2.1. Start in the workflow configuration pane. In Step 1, select the root entity, choose the entity_set from the dropdown.
2.2. In Step 2 Select Data, check the Choose specific entities to process radio button.
2.3. Select two or more rows of data from your entity_set table.
2.4. In the field at the bottom of the form, give the set_set a custom name (or use the name assigned by Terra).
2.5. Click the OK button at the bottom right of the form to save.
2.6. Configure the workflow by choosing this.entitys
from the dropdown and adding `.` and the column name (that holds the data in the entity table).
Correct attribute formatting for root entity type entity_set
this.entitys.columnName
Note that the "s" at the end of the entity table name is required and will appear in the dropdown.
Configuring hint for nested setsNote that when you are running on entity_set tables (as the root entity), you will need to be careful about the formatting of your inputs. The format for the attribute in the workflows configuration card is this.enity-name+s.column-name
.
Note that if you have a blank configuration card and select an entity set (i.e. sm-student-v3_set
) for the root entity type, this.entitys (i.e. this.sm-student-v3s
)will appear in the dropdown. You will have to add the period and the column name that holds the input data (in the entity table).
2.7. Run the workflow. When the workflow is done, there will be a new entity_set_set table in the Data page with the subset of set data you processed. You can run another workflow on the same set of sets again and again.