JDLom Posted May 2 Share Posted May 2 Hi, We are working on a variety of use cases where each time we need a purpose built asset tree. What we want to do is to search all signals and conditions from an existing simple asset tree, containing only the machine serial number as a parent. Next load our machine database containing all the useful metadata (like model type, width, power source, firmware version, etc) to allow us to build a new structure based on on the metadata that we want. For example in this case i want to build a new tree using driver, Model Type & width. (level 1, 2, 3, 4) I can easily merge the 2 dataframes (searched signals & machine metadata per serial number) together and choose the necessary levels of my tree like this: but what is still needed to convert this into a Seeq asset tree and push this to a local workbook? when I push this df I only get empty assets and no signals. Thanks, Jan Link to comment Share on other sites More sharing options...
Seeq Team Solution Mark Derbecker Posted May 2 Seeq Team Solution Share Posted May 2 It's gonna be easy! Let's assume the DataFrame you show above is called "metadata_df". Do the following: # Reduce the columns to only those that matter for metadata push metadata_df = metadata_df[['ID', 'Type_x', 'Name', 'Description', 'Build Path']] # Rename the columns to the correct names for pushing metadata_df = metadata_df.rename(columns={'Type_x': 'Type', 'Build Path': 'Path'}) # Filter out the asset rows, we don't need them metadata_df = metadata_df[metadata_df['Type'] != 'Asset'] # Mark everything as a "Reference" so that SPy builds "jump tags" for them metadata_df['Reference'] = True # https://www.youtube.com/watch?v=dPfTiX2i4Vk spy.push(metadata=metadata_df) 1 Link to comment Share on other sites More sharing options...
JDLom Posted May 3 Author Share Posted May 3 Thanks Mark, that did the trick! I was confused with other column names 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