chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Query builder doesn't fetch fields for non-default RPs

Open timraymond opened this issue 10 years ago • 3 comments

To reproduce:

  1. Create a database with two retention policies. Make one of them the default.
  2. Write data into both RPs.
  3. In the Data Explorer, select the non-default retention policy under "Databases"
  4. Select a measurement that you've written to under that RP.
  5. Witness no fields.
  6. Repeat 3 & 4 for the default retention policy and see that there are fields under the "Fields" tab.

I suspect this is because the query issued below to fetch those fields doesn't explicitly include the RP. It should look like SHOW FIELD KEYS FROM "archive"."downsampled_cpu" where "archive" is the non-default RP.

{
  "query":"SHOW FIELD KEYS FROM \"downsampled_cpu\"",
  "db":"telegraf"
}

timraymond avatar Nov 03 '16 22:11 timraymond

This was fixed by pulling the rp into the measurement name

nhaugo avatar Jan 05 '17 19:01 nhaugo

@nhaugo I'm still able to reproduce this on master

timraymond avatar Jan 05 '17 20:01 timraymond

The issue now doesn't have anything to do with the RP being default or not. The issue is that at some point (pre 1.2) measurements and tags were inserted into the database without fields. Given the new line protocol in 1.2+, this should be impossible.

121watts avatar Mar 28 '17 21:03 121watts