testing.loadMem() function
The testing.loadMem()
function loads annotated CSV
test data from memory to emulate query results returned by Flux.
Function type: Test
import "testing"
testing.loadMem(
csv: csvData
)
Parameters
csv
Annotated CSV data to load.
Examples
import "testing"
csvData = "
#datatype,string,long,string,dateTime:RFC3339,string,double
#group,false,false,true,false,true,false
#default,_result,,,,,
,result,table,_measurement,_time,_field,_value
,,0,m,2021-01-01T00:00:00Z,t,1.2
,,0,m,2021-01-02T00:00:00Z,t,1.4
,,0,m,2021-01-03T00:00:00Z,t,2.2
"
testing.loadMem(csv: csvData)
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.