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
Update Data Exploration #817
Conversation
4ebcc6a
to
b39fb44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! I like the re-org
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few things need updating, but overall great work
#### Syntax | ||
|
||
``` | ||
SELECT <function>(<field_key>) FROM <measurement_name> [WHERE <time_range>] GROUP BY [ * | <tag_key>[,<tag_key] ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think capitalize function:
SELECT <FUNCTION>(<field_key>) FROM <measurement_name> ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing bracket:
[ * | <tag_key>[,<tag_key>]]
|
||
#### Description of Basic Syntax | ||
|
||
`GROUP BY <tag>` queries require and InfluxQL [function](/influxdb/v1.0/query_language/functions/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require an InfluxQL ...
`w` weeks | ||
#### Syntax | ||
``` | ||
SELECT <function>(<field_key>) FROM <measurement_name> WHERE <time_range> GROUP BY time(<time_interval>),[tag_key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capitalize FUNCTION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, let's indicate tags in the GROUP BY can be 0 to many:
...GROUP BY time(<time_interval>)[,<tag_key>[,<tag_key>]]
``` | ||
> SELECT "water_level" FROM "h2o_feet" WHERE time >= '2015-08-18T00:00:00Z' AND time <= '2015-08-18T00:30:00Z' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SELECT "water_level", "location" FROM ...
``` | ||
> SELECT count("water_level") FROM "h2o_feet" WHERE "location"='coyote_creek' AND time >= '2015-08-18T00:06:00Z' AND time <= '2015-08-18T00:12:00Z' GROUP BY time(12m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the "location" tag from the WHERE clause, since it's not in the data anyway.
I would also clarify in the follow text that the lower time boundary is 00:06:00, because I missed that at first, and couldn't understand why users would expect COUNT = 2 at 00:06:00.
|
||
Explanation: | ||
|
||
Because the query covers a 12 minute time range and groups results into 12 minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query starts at 00:06:00 and covers 12 minute intervals. Many users expect the interval to start at 00:06:00, the explicitly supplied lower time boundary, and extend for 12 minute groups from there. The expectation is that the query would return a COUNT of 2
with the timestamp 2015-08-18T00:06:00Z
.
#### Syntax | ||
|
||
``` | ||
SELECT <function>(<field_key>) FROM <measurement_name> WHERE <time_range> GROUP BY time(<time_interval>,<offset_interval>),[tag_key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FUNCTION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...GROUP BY time(<time_interval>,<offset_interval>)[,<tag_key>[,<tag_key>]]
, and on InfluxDB's preset time boundaries to determine the raw data included in each time boundary | ||
and the timestamps returned by the query. | ||
|
||
#### Examples of Advanced Syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like WIP, lemme know when it's ready for review.
name: h2o_feet | ||
-------------- | ||
time count | ||
2015-08-18T00:06:00Z 2 | ||
``` | ||
|
||
## The `GROUP BY` clause and `fill()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is fill(null)
the default behavior? Seems like it is, but we should mention what the default is when fill()
isn't specified.
8ec6c42
to
692cbe5
Compare
9d3e3f6
to
a31c53e
Compare
a31c53e
to
e73ee67
Compare
Can't comment per-line because the diff is too big and I don't grok the GitHub Mac client enough to make PR comments. line 192:
Technically identifiers that start with a digit must also be quoted. I think that's worth mentioning here, since starting an identifier with a digit is common enough. Identifiers must be double quoted if they contain characters other than [A-z,0-9,_], if they begin with a digit, or if they are an InfluxQL keyword. While not always necessary, we recommend that you double quote identifiers. line 387: line 415: |
line 636: line 653: line 785: line 830: Line 935: line 943: line 950: |
line 1079: The time boundaries and returned timestamps for the query without the offset_interval adhere to InfluxDB's preset time boundaries. Let's first examine the reults without an offset: line 1187: line 1248: line 1280: line 1292: line 1539: line 1706: line 1742: line 1812: line 1884: line 1932: line 1993: line 2047: line 2071: line 2072: line 2095: line 2143: line 2160: line 2175: line 2182: line 2216: line 2344: line 2415: line 2468: line 2539: line 2573: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! amazing improvement. lots of little notes but I think we can get this out before the end of the week.
It shouldn't. This sounds like an error to me if it's happening. If you file a bug report, I'll try to see if I can get it fixed for 1.1. |
@jsternberg thanks for that detail. So is it fair to say that on a single node OSS instance, SLIMIT is both idempotent and deterministic? |
Yes. It should be to my knowledge. It just won't always give n series... |
Right, |
I opened an issue about using I'm also having trouble with Issue 1:
|
@rkuchan I agree with your assumptions on the behavior. I would expect the same results you expect. |
@jwilder @benbjohnson any thoughts on @rkuchan's questions about unexpected results from |
@beckettsean @rkuchan Both of those seem like bugs. I would expect a missing |
OK - opened two issues about OFFSET and SOFFSET and linked to them from the Data Exploration page. influxdata/influxdb#7577 (Thanks, @benbjohnson!) |
Restructures and reformats the Data Exploration page. Adds consistent headers (like: Syntax, Description of Syntax, Examples, Common Issues) for each section to make the doc easier to parse and understand.
It updates and edits all of the content on the page. I tried to include a lot more syntax-specific information.
Fixed issues:
#796: Creates a section dedicated to how to specify a measurement(s) in the
FROM
clause, including how to fully qualify the measurement.#536: Changes the offset_interval examples to clarify its function. I spent a lot of time on this and am very worried I've made it worse.