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

feat(cli): add option to dump the raw flux response from query #19433

Merged
merged 3 commits into from
Aug 26, 2020

Conversation

glinton
Copy link
Contributor

@glinton glinton commented Aug 25, 2020

Closes #19254

Add an option to print raw flux response from influx query

$ ./influx query --org-id 061309063e504000 -f /tmp/thing.flux -r 
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,double,dateTime:RFC3339
#group,false,false,true,true,true,true,true,false,false
#default,mean,,,,,,,,
,result,table,_start,_stop,_field,_measurement,version,_value,_time
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:12:00Z
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:13:00Z
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:14:00Z
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:15:00Z
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:16:00Z
,,0,2020-08-25T19:11:41.138618117Z,2020-08-25T19:16:41.138618117Z,gauge,go_info,go1.13.10,1,2020-08-25T19:16:41.138618117Z

$ ./influx query --org-id 061309063e504000 -f /tmp/thing.flux 
Result: mean
Table: keys: [_start, _stop, _field, _measurement, version]
                   _start:time                      _stop:time           _field:string     _measurement:string          version:string                  _value:float                      _time:time  
------------------------------  ------------------------------  ----------------------  ----------------------  ----------------------  ----------------------------  ------------------------------  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:12:00.000000000Z  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:13:00.000000000Z  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:14:00.000000000Z  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:15:00.000000000Z  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:16:00.000000000Z  
2020-08-25T19:11:44.161831113Z  2020-08-25T19:16:44.161831113Z                   gauge                 go_info               go1.13.10                             1  2020-08-25T19:16:44.161831113Z  

@russorat russorat requested a review from nathanielc August 25, 2020 21:38
Copy link
Contributor

@nathanielc nathanielc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Simple and straightforward. The change to not call Release is inaccurate, I explain it below.

cmd/influx/query.go Show resolved Hide resolved
@glinton glinton requested a review from nathanielc August 26, 2020 17:21
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

Successfully merging this pull request may close these issues.

cli: influx query should have an option to dump the raw flux response
2 participants