Ben Hines Posted September 27 Share Posted September 27 I'm adding assets to a tree using the spy.assets.Tree.insert method and passing a dataframe with columns "Name", "Type", and "Path". This works perfectly and I can build/update the tree nicely. I added some columns to the dataframe thinking that these would become visible as properites in the info view for each asset in Workbench. However, I'm not seeing these. Do assets not support additional properties? Link to comment Share on other sites More sharing options...
Seeq Team Solution John Brezovec Posted October 7 Seeq Team Solution Share Posted October 7 Inserting arbitrary properties is not currently supported when using SPy Trees. If you're using SPy Trees to quickly build trees using existing items, one alternative is to push asset tree metadata directly using spy.push. If you supply Path/Asset columns in your metadata DataFrame, SPy will place the generated items in the specified locations, generating assets when needed. When taking this approach, arbitrary properties can be specified. Here's a quick example that will run on any Seeq instance: # search for items to put in tree items_for_tree = spy.search( {"Path": "Example >> Cooling Tower 1 >> Area G", "Datasource Name": "Example Data"} ) items_for_tree["Reference"] = True # tell spy to generate references to this item, rather than modifying the item itself items_for_tree["Arbitrary Property"] = "Trumpet" # add arbitrary property columns_to_push = [ # only include the minimum necessary properties "ID", "Path", "Asset", "Name", "Type", "Reference", "Arbitrary Property", ] metadata = items_for_tree[columns_to_push] spy.push(metadata=metadata, workbook="Push Tree Directly") # push that tree! Note the use of the Reference column, which tells SPy to generate a reference to the item specified in the ID column. 1 Link to comment Share on other sites More sharing options...
Ben Hines Posted 10 hours ago Author Share Posted 10 hours ago This looks very promising. Thank you for the response! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now