Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize measurement name with backreferencing #8662

Closed
QQShan opened this issue Aug 4, 2017 · 3 comments
Closed

How to customize measurement name with backreferencing #8662

QQShan opened this issue Aug 4, 2017 · 3 comments

Comments

@QQShan
Copy link

QQShan commented Aug 4, 2017

CREATE CONTINUOUS QUERY "cq_basic_br" ON "transportation"
BEGIN
SELECT mean() INTO "downsampled_transportation"."autogen".:MEASUREMENT FROM /./ GROUP BY time(30m),*
END

how to customize measurement name in this cq

@xjerod
Copy link

xjerod commented Aug 4, 2017

The INTO clause specifies the destination measurement name. So if you wanted to downsample everything in the source measurement transportation to downsampled_transportation you would do

SELECT mean() INTO "databasename"."retentionpolicy"."downsampled_transportation" FROM "databasename"."retentionpolicy"."transportation" GROUP BY time(30m),*

@QQShan
Copy link
Author

QQShan commented Aug 5, 2017

If there is only one measurement ,it's ok,and i know how to write the CQ,but i want to downsample everything in the source database which has thousands measurements into the destination database ,and i have to write thousands CQs.

:MEASUREMENT means destination measurements have the same name as the source measurements,and i want destination measurements name have the same suffix compare to the source measurements name

@jrbury @freeformz @evanphx @tpitale @smn

@e-dard
Copy link
Contributor

e-dard commented Aug 10, 2017

Hi! We try and keep GitHub Issues for actionable bug reports or feature requests. Please post general questions on the InfluxData community site: https://community.influxdata.com

Thanks.

@e-dard e-dard closed this as completed Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants