Running Insights queries

Aarthi
Aarthi
  • Updated

Overview

Individual Insights queries are contained in blocks in a dashboard. Blocks contain individual queries within the Insights dashboard that can be configured to display their own graphs or reports. You can add blocks with your own custom SQL or using block templates.

Block templates enable users to run basic queries in Insights without using SQL. Populate a dashboard with blocks and apply dashboard-wide parameters to create holistic, dynamic reports for your organization. This article explains how to add a block template, add a block using a custom SQL query, and how to edit a block.

To make your data customizable for all your Insights users, consider adding parameters. You can apply parameters to filter data by specific subsets without directly editing the SQL query.

Note: If you are unsure if this feature is enabled on your tenant, contact your Account Manager or Benchling Support.

Getting started

Run queries by adding blocks with your own custom SQL or using block templates. After running a query, it displays at the bottom of the dashboard as a table. You can keep your data as a table or configure a visualization.

To get started, add a block to your dashboard by clicking Add block and selecting one of the following options from the drop-down menu:

  • A block template from the Block Templates section

  • SQL query to run a custom SQL query

Add a block template

After selecting a block template:

  1. Select your data of interest.

    • [Optional] Check Exclude duplicate values to remove duplicates from the results.

  2. Check the fields you want to include.

    • [Optional] Update the field display names to customize the column names that display in the block.

  3. Select a field from the Filter results drop-down menu to narrow your results further.

  4. Click Run Query to save your results and populate them in the dashboard.

Note: You can further customize your query by editing its SQL code from the block template, but before accessing the SQL editor, ensure your template is complete. You cannot return to the template after entering the SQL editor.

Add a block using a custom SQL query

In the block’s SQL editor:

  1. Enter your query code in the SQL editor.

  2. [Optional] Use the schema browser to search your schemas in Benchling’s data warehouse and find their table names to use in queries.

  3. Click Run query.

Tip: Use the schema browser to find queryable schema tables in the data warehouse and view their relationships.

Edit a block

After your block is created in the dashboard, you can customize it further by clicking an icon in the top-right corner of a block to take the following actions:

  • Pencil icon - Click the pencil icon to open the SQL editor where you can edit:

    • SQL query code

    • Chart type

  • Block settings

    • Name

    • Description

  • Ellipses

    • Download as .csv

    • Copy to clipboard

    • Add to worklist

    • Execute request

    • Duplicate

    • Delete

  • Expand - Click to make the block fill the window

  • Six dot grid - Click and drag to move the block to a different place in the dashboard

Was this article helpful?

Have more questions? Submit a request