Tanya, InfluxDB uses epoch 0 and now() as the default time boundaries for queries. You can imagine that every query has "WHERE time > 0 AND time < now()" in the where clause.
When you use a query like "WHERE time < 0" that replaces the upper bound, but the implicit lower bound is still epoch 0. In effect, your query is this: SELECT * FROM month WHERE time > 0 AND time < 0 As you can see, that will never have any results. To query before epoch 0 you need to move the lower bound of the time range, not the upper bound. Try something like: SELECT * FROM month WHERE time > '1950-01-01' or SELECT * FROM month WHERE time > now() - 5000w On Mon, Sep 12, 2016 at 1:05 AM, Tanya Unterberger < [email protected]> wrote: > Hi Sean, > > I have installed version 1.0.0. I still have an issue of querying data > prior to 1970. > > Am I doing anything wrong? > > My test is: > > > INSERT months,stn_num=66046 lsd="01/01/1832",prcp_day_cnt= > 1,prcp_day_cnt_qual="X",ttl_mo_prcp=55.9,ttl_mo_prcp_qual= > "X",data_src=1,last_update_prcp="23/07/2009" -4354905600000 > > > select * from month > > select * from month where time < 0 > > Thanks, > Tanya > > On 30 August 2016 at 10:22, Tanya Unterberger <[email protected] > > wrote: > >> Thank you!!! >> >> On 30 Aug 2016 9:28 AM, "Sean Beckett" <[email protected]> wrote: >> >>> Fixed and in the imminent RC2 release: https://github.com/in >>> fluxdata/influxdb/pull/7212 >>> >>> On Tue, Aug 23, 2016 at 6:35 PM, Tanya Unterberger < >>> [email protected]> wrote: >>> >>>> Great news, thanks a lot!!! >>>> >>>> On 24 August 2016 at 09:00, Sean Beckett <[email protected]> wrote: >>>> >>>>> It's a regression bug, so it is a priority. It's also fairly trivial, >>>>> so it should be quick. 1.0 will be released in early September and we just >>>>> cut RC1 today. I would anticipate this fix being in RC2, which will be out >>>>> later this week or early next. >>>>> >>>>> On Tue, Aug 23, 2016 at 4:51 PM, Tanya Unterberger < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Sean, >>>>>> >>>>>> Thank you so much for the prompt reply, much appreciated! >>>>>> >>>>>> Is it a difficult bug to fix? I.e. when can we expect it to be fixed, >>>>>> please? I noticed that it was assigned to the version 1.0.0. Is there an >>>>>> ETA for this version, please? We have a large number of historical >>>>>> records >>>>>> we need to insert and depending on whether we can query them or not we >>>>>> would need to consider alternative solutions. >>>>>> >>>>>> Thanks again, >>>>>> Tanya >>>>>> >>>>>> >>>>>> On 24 August 2016 at 05:26, Sean Beckett <[email protected]> wrote: >>>>>> >>>>>>> Tanya, it appears to be a bug in 0.13 where the query engine won't >>>>>>> allow time ranges older than epoch 0. That is a regression bug and I've >>>>>>> opened an issue: https://github.com/influxdata/influxdb/issues/7194 >>>>>>> >>>>>>> Your writes are succeeding and the data is persisting, but the data >>>>>>> is unqueryable until the bug is fixed. >>>>>>> >>>>>>> The other queries are failing to return the results because the >>>>>>> default lower time bound is epoch 0. When you issue "SELECT * FROM >>>>>>> hist_days" there's an implicit "WHERE time > 0 and time < now()" on that >>>>>>> query due to internal defaults. The problem is that the query parser >>>>>>> won't >>>>>>> currently allow a statement like "SELECT * FROM hist_days WHERE time > >>>>>>> '1900-01-01'", which would reset the lower bound. >>>>>>> >>>>>>> On Mon, Aug 22, 2016 at 10:16 PM, <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I have a number or records that go back way before 1970. I am >>>>>>>> having trouble inserting these records into InfluxDB. >>>>>>>> >>>>>>>> I tried to insert very simple records either via CLI or via curl. >>>>>>>> Either approach does not give an error but the data doesn't get in. >>>>>>>> Alternatively I am not queuing the database correctly. In either case I >>>>>>>> cannot see the data I need to retrieve. >>>>>>>> >>>>>>>> The simplified version of the inserts and queries is as follows: >>>>>>>> >>>>>>>> >>>>>>>> [xxx ~]$ curl -i -XPOST 'http://localhost:8086/write?db=history' >>>>>>>> -H 'Content-Type: text/plain' --data-binary 'hist_days,stn_num=61310 >>>>>>>> prcp=1,prcp_type="RAIN" -531360000000' >>>>>>>> HTTP/1.1 204 No Content >>>>>>>> Request-Id: a5264040-68c4-11e6-80a3-000000000000 >>>>>>>> X-Influxdb-Version: 0.13.0 >>>>>>>> Date: Tue, 23 Aug 2016 00:00:47 GMT >>>>>>>> >>>>>>>> [xxx ~]$ curl -i -XPOST 'http://localhost:8086/write?db=history' >>>>>>>> -H 'Content-Type: text/plain' --data-binary 'hist_days,stn_num=61310 >>>>>>>> prcp=1,prcp_type="RAIN" 531360000001' >>>>>>>> HTTP/1.1 204 No Content >>>>>>>> Request-Id: a7514208-68c4-11e6-80a4-000000000000 >>>>>>>> X-Influxdb-Version: 0.13.0 >>>>>>>> Date: Tue, 23 Aug 2016 00:00:51 GMT >>>>>>>> >>>>>>>> [xxx ~]$ influx >>>>>>>> Visit https://enterprise.influxdata.com to register for updates, >>>>>>>> InfluxDB server management, and monitoring. >>>>>>>> Connected to http://localhost:8086 version 0.13.0 >>>>>>>> InfluxDB shell version: 0.13.0 >>>>>>>> > use history >>>>>>>> Using database history >>>>>>>> > select * from hist_days >>>>>>>> name: hist_days >>>>>>>> --------------- >>>>>>>> time prcp prcp_type stn_num >>>>>>>> 531360000001 1 RAIN 61310 >>>>>>>> >>>>>>>> > select * from hist_days where time < 0 >>>>>>>> > >>>>>>>> >>>>>>>> >>>>>>>> Can you please help as I need to ingest historical data!!! >>>>>>>> >>>>>>>> Tanks a lot, any help is appreciated. >>>>>>>> >>>>>>>> Tanya >>>>>>>> >>>>>>>> -- >>>>>>>> Remember to include the InfluxDB version number with all issue >>>>>>>> reports >>>>>>>> --- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "InfluxDB" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> To post to this group, send email to [email protected]. >>>>>>>> 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/61366ffc-2c9c-4b4 >>>>>>>> 9-8599-28de3b2b7332%40googlegroups.com. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Sean Beckett >>>>>>> Director of Support and Professional Services >>>>>>> InfluxDB >>>>>>> >>>>>>> -- >>>>>>> Remember to include the InfluxDB version number with all issue >>>>>>> reports >>>>>>> --- >>>>>>> You received this message because you are subscribed to a topic in >>>>>>> the Google Groups "InfluxDB" group. >>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>>>> pic/influxdb/JSSmSp5oBaU/unsubscribe. >>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>> [email protected]. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> 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/CALGqCvPvUDGidNvz >>>>>>> t032x0v%2BmJyfjRaUnshBDgDSZV9HVPqbnA%40mail.gmail.com >>>>>>> <https://groups.google.com/d/msgid/influxdb/CALGqCvPvUDGidNvzt032x0v%2BmJyfjRaUnshBDgDSZV9HVPqbnA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>>> Remember to include the InfluxDB version number with all issue reports >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "InfluxDB" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> 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/CAAHSRnDWxA78WKq% >>>>>> 2BVUvidt%3DO6ne3mGdNuUacQ2yUGqFCuWYSrw%40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/influxdb/CAAHSRnDWxA78WKq%2BVUvidt%3DO6ne3mGdNuUacQ2yUGqFCuWYSrw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Sean Beckett >>>>> Director of Support and Professional Services >>>>> InfluxDB >>>>> >>>>> -- >>>>> Remember to include the InfluxDB version number with all issue reports >>>>> --- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "InfluxDB" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>> pic/influxdb/JSSmSp5oBaU/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> 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/CALGqCvO05jg73WjU >>>>> QTeg5H%3D3bmV3wpLKWYzL-gi0qmV-PBGFiA%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/influxdb/CALGqCvO05jg73WjUQTeg5H%3D3bmV3wpLKWYzL-gi0qmV-PBGFiA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>>> Remember to include the InfluxDB version number with all issue reports >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "InfluxDB" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/influxdb. >>>> To view this discussion on the web visit https://groups.google.com/d/ms >>>> gid/influxdb/CAAHSRnBDeHafuNLDnL5sx7jxsotBVq5ttvXVZWeX_EQWO_ >>>> 1z2g%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/influxdb/CAAHSRnBDeHafuNLDnL5sx7jxsotBVq5ttvXVZWeX_EQWO_1z2g%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Sean Beckett >>> Director of Support and Professional Services >>> InfluxDB >>> >>> -- >>> Remember to include the InfluxDB version number with all issue reports >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "InfluxDB" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>> pic/influxdb/JSSmSp5oBaU/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/influxdb. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/influxdb/CALGqCvNrtoRKExKS0ysRfhj0yW6zb9YOnZZ8e%3DvWC22t >>> za0a5g%40mail.gmail.com >>> <https://groups.google.com/d/msgid/influxdb/CALGqCvNrtoRKExKS0ysRfhj0yW6zb9YOnZZ8e%3DvWC22tza0a5g%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> > -- > Remember to include the InfluxDB version number with all issue reports > --- > You received this message because you are subscribed to the Google Groups > "InfluxDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > 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/CAAHSRnBwe0%3DN23wkO22PnS%3D38xQ3zKwU8NnNVJsiDvM5TuCDeA% > 40mail.gmail.com > <https://groups.google.com/d/msgid/influxdb/CAAHSRnBwe0%3DN23wkO22PnS%3D38xQ3zKwU8NnNVJsiDvM5TuCDeA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. 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/CALGqCvOvApHZ4Aoh%2Beg%3Dx8UpBx647XtjeFW753vPivFjYh5%3DYA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
