Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f7f30b5

Browse filesBrowse files
author
Shan Desai
authored
Refactor tutorial_udp example for timestamps (influxdata#808)
- `time` key should be within each datapoint - This PR addresses influxdata#788 regarding the structure of the data when inserting via UDP. - The original documentation contributed by me took the structure of the `tutorial.py` as base. However, upon testing, the timestamp in the example are not written (2020 is written as opposed to 2009). - Tested for `influxdb-python` v5.2.3 and InfluxDB v1.6.1
1 parent 351b98a commit f7f30b5
Copy full SHA for f7f30b5

File tree

1 file changed

+8
-7
lines changed
Filter options

1 file changed

+8
-7
lines changed

‎examples/tutorial_udp.py

Copy file name to clipboardExpand all lines: examples/tutorial_udp.py
+8-7Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ def main(uport):
2929
"host": "server01",
3030
"region": "us-west"
3131
},
32-
"time": "2009-11-10T23:00:00Z",
3332
"points": [{
3433
"measurement": "cpu_load_short",
3534
"fields": {
3635
"value": 0.64
37-
}
36+
},
37+
"time": "2009-11-10T23:00:00Z",
3838
},
39-
{
40-
"measurement": "cpu_load_short",
41-
"fields": {
42-
"value": 0.67
43-
}
39+
{
40+
"measurement": "cpu_load_short",
41+
"fields": {
42+
"value": 0.67
43+
},
44+
"time": "2009-11-10T23:05:00Z"
4445
}]
4546
}
4647

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.