Options

Want to extract values from excel and use in 'data item in 'Calculate data' operator ('sensor link')

Himanshu_PantHimanshu_Pant Member Posts: 46 Contributor I
I have an excel which contain a column name. I want to use the values of column name in 'data item' in 'Calculate data' operator ('sensor link'), so that manual efforts of adding values in 'data item' will get reduced.

Answers

  • Options
    kaymankayman Member Posts: 662 Unicorn
    You can use 'rename by example' operator to do something like this, if your first row contains your labels you just add row number 1 (the default).

    If your labels are all in a row you may need to pivot first.
  • Options
    Himanshu_PantHimanshu_Pant Member Posts: 46 Contributor I
    Actually here I am not looking for renaming. I want to use all the values of a column (may by using a macro) in 'edit parameter list' of 'data item' in 'Calculate data' operator ('sensor link'). I want to avoid the process of adding the parameter manually.
  • Options
    kaymankayman Member Posts: 662 Unicorn
    Ah, in that case you probably need to combine the loop examples and the extract macro operators.
    So you loop through the example, for each example you extract the value you need to a macro, and then use that macro for your sensor link.

    Something like that...
  • Options
    Himanshu_PantHimanshu_Pant Member Posts: 46 Contributor I
    ya, that was my first approach. But Since the dataset is high, the system is getting hanged. So I was looking for a process which doesn't use loop. Instead, if we can directly supply value to 'edit parameter list' of 'data item' in 'Calculate data' operator ('sensor link').
  • Options
    Himanshu_PantHimanshu_Pant Member Posts: 46 Contributor I
    @mschmitz Can you please help me with this?
  • Options
    kaymankayman Member Posts: 662 Unicorn
    Do you use the 'remove unused values' operator during your loop?
    I'd recommend this for bigger sets, as this way you only use the relevant data, while otherwise the 'hidden' metadata remains part of your flow. 

    This can have a huge effect on speed and memory when dealing with loops and filters on bigger sets.

    I use it by default on every step where I need to filter or loop. 
  • Options
    cerdocerdo Member Posts: 3 Contributor I
    edited August 2021
    Any solution for this?

    Tried "Set Parameters from ExampleSet" from Toolbox, but not able to set values for enumeration.

    @yyhuang can you help with this case.
Sign In or Register to comment.