Jump to content

Ben Hines

Members
  • Posts

    12
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Ben Hines

  1. I have a simple DataLab notebook that identifies new signals and adds them to an asset tree. It seems pretty simple to have this run periodically using spy.jobs.schedule. Another option I'm considering is to extract the code from my notebook into a .py file and run it periodically on an existing Airflow infrastructure. Some of the advantages of using my own infrastructure is include monitoring/alerting, log collection, etc. Are there other aspects I should be considering? For instance, there is a prominent warning in the spy documentation to be careful about scheduling jobs due to resource consumption and adverse effects on performance. It's unclear how script complexity will affect performance. I'm not even sure how to monitor performance of a scheduled notebook. Any advice you can provide would be appreciated.
  2. I figured it out. I had previously looked at the Date Ranges on the Dashboard, but wasn't seeing the single capsule in my condition. This was because the date span in that dialog was being applied. to the capsules. Once I widened that range, I was able to select my capsule and have it applied to the graph. This seems rather clunky. I'd like this dashboard to automatically enclose the signal span without me having to select the condition. Is this possible?
  3. I have assets that contain a couple of signals and conditions. One of the conditions has a single capsule that spans all of the timestamps in the signals. The reason for this is that my users will generally want to see the entire data set (which is relatively small) and then zoom in on interesting time spans. I created a workbench analysis that produces a control chart using the signals and conditions in the asset. Then, I use this control chart in a Dashboard. When I select a different Asset Selection in the dashboard, it loads the correct signals and updates the graph, but I would also like to have the displayed time span enclose the single-capsule condition that I mentioned previously. I don't see a way to do this. This seems pretty desirable. Am I missing something?
  4. Thanks. I solved this by putting my query inside a WITH like so: WITH Temp AS ( SELECT MIN(WO.RUNCOMPLETE) AS FirstSampleTime, MAX(WO.RUNCOMPLETE) AS LastSampleTime FROM ...Joined tables... WHERE ...Some conditions... ) SELECT FirstSampleTime, LastSampleTime FROM Temp
  5. I have a condition defined in my SQL connector configuration that selects the min and max timestamps from my data. The goal is to produce a condition that has a single capsule that spans my entire data set. The SQL query looks something like this: SELECT MIN(WO.RUNCOMPLETE) AS FirstSampleTime, MAX(WO.RUNCOMPLETE) AS LastSampleTime FROM ...Joined tables... WHERE ...Some conditions... The resulting condition in Seeq workbench reports an error when compiling this: SELECT MIN(WO.RUNCOMPLETE) AS FirstSampleTime, MAX(WO.RUNCOMPLETE) AS LastSampleTime FROM ...Joined tables... WHERE LASTSAMPLETIME IS NOT NULL AND FIRSTSAMPLETIME IS NOT NULL ...Some conditions... ORDER BY FIRSTSAMPLETIME DESC LIMIT 1 It seems Seeq is inserting WHERE conditions on LastSampleTime and FirstSampleTime and this is causing an error. Question 1: Why is Seeq inserting the WHERE conditions? Question 2: Is there a workaround for this? The data I'm using tends to be looked at in its entirety. So, having a condition with a single capsule that spans the time for all samples is very handy.
  6. Greetings, In Seeq DataLab, I have a script that pushes a set of signals to a workbook. Each signal shows up in the workbook in a separate lane. I'd like these signals to: Share the same lane and... Share the same y-axis I've reading the spy.push documentation and, thus far, have not been able to find information about this. Is this possible?
  7. Thanks for the explanation. I've implemented this as suggested and it performs vastly better than my original implementation!
  8. I thought the issue might be that the complete path needs to exist in the tree. So, I tried this quick experiment: # Ensure the path "Level 1 >> Level 2 >> Level 3" exists in the tree: tree.insert(parent = sqc_tree.name, children = ['Level 1']) tree.insert(parent = 'Level 1', children = ['Level 2']) tree.insert(parent = 'Level 1 >> Level 2', children = ['Level 3']) # Set the path on the signals in the search results and add to the tree tags_to_insert['Path'] = 'Level 1 >> Level 2 >> Level 3' tree.insert(tags_to_insert) tree.visualize() This now looks like: My Tree |-- Level 1 | |-- Level 2 | |-- Level 3 |-- Level 3 |-- Signal 1 |-- Signal 2 |-- Signal 3 |-- ... Notice that the signals are ending up under a top-level "Level 3" rather than the nested one.
  9. Thanks for the information. I have a follow-up question... Let's say that my tree is initially empty and I want the search results to be inserted, say, 3 levels deep. I tried this: tags_to_insert['Path'] = 'Level 1 >> Level 2 >> Level 3' tree.insert(tags_to_insert) tree.visualize() The resulting tree looks like this: Insert with DataFrame My Tree Level 3 Signal Signal ... I was expecting something more like: My Tree Level 1 Level 2 Level 3 Signal Signal ... Can you let me know why this is?
  10. Hi John. Eventually, that's the goal. For now, I'm just stepping through in a notebook to make sure its correct and performant.
  11. I'm building an asset tree using Python in Seeq Data Lab which will contain thousands of signals, conditions, and such. The path is always 3 levels deep and looks something like Product Category->Product ID->Quality Recipe->Quality Signal (or Condition). The connector which defines the signals and conditions for my datasource encodes the prescribed hierarchy path as the "Description" property on each Signal/Condtion. My logic looks something like this: Get the existing hierarchy tree using spy.assets.Tree(...) Use spy.search(...) to get all of the signals and conditions that I'm interested in Use information from the asset tree and search results to determine: What branches do not yet exist in the tree Which signals+conditions do not yet exist in the tree. All of the branches to which the new signals will be added Build the new branches in the tree Add the new signals+conditions to the tree as follows: For each of the branches where new signals will go: Extract a new dataframe from the search results dataframe. This dataframe will have only the new signals that belong to the current branch. Use the spy.tree.insert(...) passing in the parent_path as the branch and the children as the dataframe containing the new signals that belong to the branch. This allows me to run my script to update the existing tree as efficiently as I've been able to figure out. The problem is that this script still takes forever. Most of the time is spent in the calls to spy.tree.insert. Is there a better and more efficient way to call this function?
×
×
  • Create New...