Skip to main content
Version: 0.95

Adding a Data Table Viewer

The TableConverter operator is a powerful tool in Snorkel Studio that allows you to represent complex, nested data in an easily readable table view. If your dataset includes columns with nested data (like arrays of dictionaries), the TableConverter helps you "flatten" this data into a more accessible format. This is especially useful for fields like user interactions, product attributes, or any data that naturally groups multiple related items.

Configuring the TableConverter Operator

  1. Navigate to the Application Studio and expand the desired node.

    expand_node_button.webp

  2. Ensure you are in Edit mode (use the mode selector in the top right corner of the Application Studio).

  3. Add a new node by selecting the three vertical dots on the node labeled Model, and then select Add node before.

  4. When prompted, select ChangeColumns.

    add_node_button.webp

  5. Commit the TableConverter operator to the node:

    • Open the node's menu (three dots) and select "commit an operator".
    • Search for and select "TableConverter".
  6. Configure the TableConverter fields:

    • Select the column containing the array of dictionaries.
    • Specify an output suffix to name the new table column.

    table_converter_fields.webp

  7. Commit the changes and refresh the model node if prompted.

Displaying the Table View

  1. Return to the Application Studio.

  2. Open the data viewer settings (gear icon).

  3. Click "Select displayed columns" and ensure the new table column is checked.

  4. Scroll the data viewer to find your newly generated table.

    table_example.webp

Using the Data Table Viewer

The table view offers several features to enhance data exploration:

  • Column Selection: Use the column button in the top right corner to customize displayed columns.
  • Pagination: Navigate through data pages using arrows in the bottom right corner.
  • Search: Use the top-left search bar to filter data based on any visible label.
  • Row Count: View the total number of rows in the bottom right corner.
  • Sorting: Click on column headers to sort data. Use arrows to toggle ascending/descending order.

table_howto.webp

Example Use Case

In this documentation, we use an email classification dataset (HAM vs. SPAM) with a participants field to demonstrate the TableConverter. Your specific use case may vary depending on your dataset structure.

Tips for Effective Use

  • Ensure your target column contains an array of dictionaries before applying the TableConverter.
  • Choose a meaningful output suffix to easily identify your new table column.
  • Experiment with different column combinations in the table view to gain insights into your data.