1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
// This file is autogenerated, DO NOT EDIT
// data-streams/set-up-tsds.asciidoc:220
[source, python]
----
resp = client.bulk(
index="metrics-weather_sensors-dev",
operations=[
{
"create": {}
},
{
"@timestamp": "2099-05-06T16:21:15.000Z",
"sensor_id": "HAL-000001",
"location": "plains",
"temperature": 26.7,
"humidity": 49.9
},
{
"create": {}
},
{
"@timestamp": "2099-05-06T16:25:42.000Z",
"sensor_id": "SYKENET-000001",
"location": "swamp",
"temperature": 32.4,
"humidity": 88.9
}
],
)
print(resp)
resp1 = client.index(
index="metrics-weather_sensors-dev",
document={
"@timestamp": "2099-05-06T16:21:15.000Z",
"sensor_id": "SYKENET-000001",
"location": "swamp",
"temperature": 32.4,
"humidity": 88.9
},
)
print(resp1)
----
|