From table to scalar

Hello,

I have a very basic problem, after having generated tables with humidity and temperature data I would like to send a single value via email but I am not able to reference or extract it properly. Other script languages offer simple indexing to extract values from a table however I haven’t found an example to do the same with Flux. For example if you want to get the last value of the third column of matrix A in Matlab you just use A(end,3) and that’s it. In the following script I would like to assign the temperature _value of the Temperature table to the variable T_data_report_value which is now a constant (25.7).


I am quite sure that I am not the first one who struggles with this type of problem.
Thanks for your time.

Cheers,
SpeedY

There are a few Flux functions that will let you do this, see Extract scalar values in Flux | InfluxDB OSS 2.1 Documentation for how to use them

Hello mhall119,

I have just found the link to a prior version (1.8) and it still works. The modified script looks as follows.

Cheers,
SpeedY