Thank you for your post !
My need is a little bit different.
What i want to do is to add a static tag field. The Tag Field is not in the
data before so a group by is not what i need.
Something like
CREATE CONTINUOUS QUERY "cq_basic" ON "transportation"
BEGIN
SELECT mean("passengers"), customer="Test" INTO "average_passengers"
FROM "bus_data" GROUP BY customer, time(1h)
END
greets
claus
Am Dienstag, 7. Februar 2017 13:07:05 UTC+1 schrieb Dan Offord:
>
> You can either do it as a tag or an explicit where clause based on the
> customer.
>
> Where clause:
> CREATE CONTINUOUS QUERY "cq_basic" ON "transportation"
> BEGIN
> SELECT mean("passengers") INTO "average_passengers" FROM "bus_data"
> WHERE customer = "test" GROUP BY time(1h)
> END
>
> Tag:
> CREATE CONTINUOUS QUERY "cq_basic" ON "transportation"
> BEGIN
> SELECT mean("passengers") INTO "average_passengers" FROM "bus_data"
> GROUP BY customer, time(1h)
> END
>
> --
> Kind Regards,
>
> Dan Offord
> DevOps
>
> Multiplay (UK) Ltd, Unit 7 Whitefield, Lepe Road, Blackfield
> Southampton, Hampshire, SO45 1XR
>
> Registered in England & Wales No. 3370594
>
> www: multiplay.com | www.multiplayevents.com
> Twitter: @liv3d <http://twitter.com/liv3d>| Skype: mpukliv3d | LinkedIn
> <http://uk.linkedin.com/in/danofford/>
>
> On 7 February 2017 at 10:42, Claus Koell <[email protected] <javascript:>>
> wrote:
>
>> Hi ..
>>
>> Is it possible to create a continuous query and insert a fix tag value ?
>>
>> Example:
>>
>> CREATE CONTINUOUS QUERY "cq_basic" ON "transportation"
>> BEGIN
>> SELECT mean("passengers") INTO "average_passengers" FROM "bus_data" GROUP
>> BY time(1h)
>> END
>>
>>
>> Now i want to insert a tag value like customer=test to the inserted lines
>> ...
>>
>> Is this possible ?
>>
>> greets
>> claus
>>
>> --
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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/92e6a1ca-777b-41b7-a081-91e30747405b%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/influxdb/92e6a1ca-777b-41b7-a081-91e30747405b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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 [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/377fa699-19fd-4f96-b9c0-a551b8d851fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.