There is no precision specified on the writes, so they are defaulting to
nanosecond. The retention policy is also being set here
<https://github.com/influxdata/influxdb-python/blob/master/examples/tutorial_server_data.py#L58>
for 3 days so the writes are getting dropped as they're being written,
since the timestamps are very far in the past (in nanosecond land).

To fix it, you'll want to set the timestamp precision to "s" (seconds) here
<https://github.com/influxdata/influxdb-python/blob/master/examples/tutorial_server_data.py#L61>
:

```
client.write_points(series, retention_policy=retention_policy,
time_precision="s")
```


On Thu, Dec 1, 2016 at 2:38 PM, <vikas...@gmail.com> wrote:

> Hi,
>
> I am new to influxdb.
>
> I have influxdb server version 1.0.1 running.
>
> I am using influxdb-python (influxdb-3.0.0) and trying the tutorial
>
> https://github.com/influxdata/influxdb-python/blob/master/
> examples/tutorial_server_data.py
>
> I get
>
> $ python tutorial_server_data.py
> Create database: tutorial
> Create a retention policy
> Write points #: 4320
> ResultSet({})
> Result: ResultSet({})
>
>
> i.e. I cannot read back any of the inserted values. I even relaxed the
> query to show all.
>
> Also when I do
>
> query = 'SHOW DATABASES'
> result = myclient.query(query)
> result
>
> I can see 'tutorial' in the output. So I am able to talk to my influxdb
> server
>
> But
> query = 'SHOW MEASUREMENTS'
> result = myclient.query(query)
> result
>
> give nothing.
>
> I assume I am missing something trivial.
>
> Can someone help?
>
> Thanks,
> Vikas
>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/ac0d5500-8707-41d9-8ed8-8fca8c9e446b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CAD8sRLDQFkhse-1YB_tYwOuqrsCageGZFx5gL10-Kfa6-v2FYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to