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

[CLI feature request] USE retention policy for queries #3188

Closed
beckettsean opened this issue Jun 29, 2015 · 1 comment · Fixed by #7708
Closed

[CLI feature request] USE retention policy for queries #3188

beckettsean opened this issue Jun 29, 2015 · 1 comment · Fixed by #7708

Comments

@beckettsean
Copy link
Contributor

Similar to USE mydb but USE retention_policy. Useful if I want to repeatedly query measurements in a non-default retention policy.

Not sure about the syntax. Maybe USE RP <rp> or USE_RP <rp>.

@beckettsean
Copy link
Contributor Author

@corylanou there appears to be a feature like this already, or maybe it's related to the work @DanielMorsing did on INTO queries:

> show retention policies on mydb
name    duration    replicaN    default
raw 2057h36m0s  1       true
foo 2016h0m0s   1       false

> insert into foo boo value=42
Using retention policy foo

> select * from foo.boo
name: boo
---------
time                value
2015-11-04T21:30:56.791303649Z  42

> select * from raw.boo

> insert boo value=12
> select * from raw.boo
> select * from foo.boo
name: boo
---------
time                value
2015-11-04T21:30:56.791303649Z  42
2015-11-04T21:33:03.781864143Z  12

> insert into raw
ERR: Post http://localhost:8086/write?consistency=any&db=mydb&precision=n&rp=foo: EOF

> insert into raw boo value=67
Using retention policy raw
> select * from foo.boo
name: boo
---------
time                value
2015-11-04T21:30:56.791303649Z  42
2015-11-04T21:33:03.781864143Z  12

> select * from raw.boo
name: boo
---------
time                value
2015-11-04T21:33:27.823305637Z  67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants