-
Notifications
You must be signed in to change notification settings - Fork 524
make_lines does not provide timestamps in the resultant line protocol string #788
Comments
Upon looking into tests it seems that the the from influxdb import line_protocol
measurement = {
'tags': {
'source': 'gps'
},
'points': [
{
'measurement': 'location',
'time': 1582562852,
'fields': {
'lat': 53.11203666666667
}
}
]
}
print(line_protocol.make_lines(measurement, precision='s')) Output:
This implies there is an error in the documentation for UDP that I previously wrote. There the @sebito91 which is the correct JSON structure for the time parameter here? Should it be outside the |
Case 1: HTTPthe Case 2: UDPUDP data also relies on This implies that |
- `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
- `time` key should be within each datapoint - This PR addresses #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
- `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
InfluxDB version: e.g. 1.7.7 (output of the
influx version
command)InfluxDB v.1.6.1
InfluxDB-python version: e.g. 5.2.2 (output of the
python -c "from __future__ import print_function; import influxdb; print(influxdb.__version__)"
command)5.2.3
Python version: e.g. 3.7.4 (output of the
python --version
command)3.6.1
Operating system version: e.g. Windows 10, Ubuntu 18.04, macOS 10.14.5
Windows 10
Behavior
Assuming I wish to convert the following valid JSON structure:
I use the following code:
Only provides the following output without the timestamp:
There is timestamp that is added to the line protocol result.
Irrespective if
time
is a string or not the resultant line protocol does not add timestamps to it.The text was updated successfully, but these errors were encountered: