Jump to content

Pull All Signals on Workbench Display to Seeq Data Lab


Joe Reckamp

Recommended Posts

  • Seeq Team

QuestionI've already got a Seeq Workbench with a mix of raw signals and calculated items for my process. Is there a way to grab all signals and conditions on the display rather than having to find all of those through a spy.search()?

Answer: Yes, you can absolutely specify the workbook ID and the worksheet number to grab the display items from the Seeq Workbench. Here's an example of how to do that:

The first step is to pull the desired workbook by specifying the Workbook ID:

desired_workbook = spy.workbooks.pull(spy.workbooks.search({
    'ID': '741F06AE-62D6-4729-A4C3-8C9CC701A2A1'
}),include_referenced_workbooks=False)

If you are not aware, the Workbook ID can be found in the URL by finding the identifier following the .../workbook/... part of the URL. (e.g. https://explore.seeq.com/workbook/741F06AE-62D6-4729-A4C3-8C9CC701A2A1/worksheet/DFAC6933-A68F-4EEB-8C57-C34956F3F238). In this case, I added an extra function to not include referenced workbooks so that we only get the workbook with that specific ID.

Once you have the desired workbook, you will want to grab the index 0 of the desired_workbook since there should only be one workbook with that ID. You will then want to specify which worksheet you want to grab the display items from. In order to see your options for the worksheet index, run the following command:

desired_workbook[0].worksheets

This command should return a list of the possible worksheets within the Workbook ID you specified. For example, an output might look like this:

[Worksheet "1" (EDAA0608-29EA-4EA6-96FA-B6A59D8AE003),
 Worksheet "From Data Lab" (34AC07F9-F2FF-4C9E-A923-B636D6642B32)]

Depending on which worksheet in the list you want to grab the display items from, you will then specify that index. Please note that the indexes start at 0, not 1 so the first worksheet will be index 0. Therefore, if I wanted the first worksheet in the list, I can specify that I want to know the display items as:

displayed_items = desired_workbook[0].worksheets[0].display_items

If you show what the item "displayed_items" looks like, you should get a Pandas DataFrame of the Workbench items as if you had done a spy.search for all of them. For example:
image.png

You can then use displayed_items as your DataFrame to perform the spy.pull() command to grab the data from a specific time range. 

  • Thanks 1
Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...