Skip to main content

Save and Reuse Queries

This article details how to save queries, reuse saved and recent queries, and delete saved queries in your Brinqa Platform.

Save queries

Performing searches is a fundamental aspect of exploring your data in the Brinqa Platform. Whether you use the Brinqa Query Language (BQL) search or the Visual Query Builder (VQB), it can be beneficial to save your most commonly used queries to easily and quickly access them for future use. Saved queries can be reused across different pages in your instance, provided that the page supports querying for the target data model. For instance, any saved query can be reused on the Explorer page, as the Explorer page acts as a global search page.

To save a query, follow these steps:

  1. Navigate to the page on which you want to save the query, such as Inventory > Installed packages.

  2. Click the icon to the left of the search area, and then select BQL or Query builder.

    query switcher

  3. Either type your BQL query and press Enter, or build your query with the VQB, and then click Apply filters.

    note

    The query must be valid in order to save it. You can not save an invalid query.

    For example, you can use the following BQL query to retrieve all your hosts running on macOS with Google Chrome installed on them:

    FIND InstalledPackage AS s THAT INSTALLED_ON Host AS h WHERE h.os CONTAINS "macOS" AND s.name CONTAINS "Chrome"
  4. Click Save query save query icon in the search bar and fill in the following:

    • Title: The name of your saved query.

    • Description: The description of your saved query.

    • Query: This field contains the query you are saving and cannot be changed.

    • New label: The label you want to apply to the query. Labels categorize your saved queries.

  5. Click Save.

    The following screenshot illustrates saving the BQL query that was used in step 3 above:

    Save query example

Reuse recent and saved queries

You can reuse your most recently used queries and saved queries. To reuse a recently used query, follow these steps:

  1. Navigate to the page on which you want to reuse a query, such as Explorer.

  2. Click the icon to the left of the search area, and then select BQL or Query builder.

  3. Click the caret menu caret menu in the search bar to display your most recent queries.

  4. Click the recently used query to populate the search bar with that specific query.

    The query runs automatically.

    The recent query in the recent queries menu

To use a saved BQL query, follow these steps:

  1. Navigate to the page on which you want to use a saved query, such as Explorer.

  2. Click the icon to the left of the search area, and then select BQL or Query builder.

  3. Click the caret menu caret menu in the search bar to display your queries.

  4. Click Saved queries.

    A new window appears containing a list view of your saved queries.

    saved queries list

  5. Hold the pointer over the saved query you want to use, and then click Select.

    The query populates the search bar and runs automatically.

    saved query populates the search bar

Delete a saved query

To delete a saved query, follow these steps:

  1. Navigate to the page where the saved query you want to delete is located.

  2. Click the icon to the left of the search area, and then select BQL or Query builder.

  3. Click the caret menu caret menu icon in the search bar.

  4. Click Saved queries.

  5. Hold the pointer over the saved query you want to delete, and then click Delete.