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

Multiple yield parsing #75

Closed
ischolten opened this issue May 31, 2019 · 2 comments
Closed

Multiple yield parsing #75

ischolten opened this issue May 31, 2019 · 2 comments
Assignees
Labels

Comments

@ischolten
Copy link

I am running a query with that has multiple yields in it. I am then using the fromFlux() function to parse the data.

The following is the csv response:


#group,false,false,true,true,false
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,double
#default,writes_kb,,,,
,result,table,_start,_stop,writes_kb
,,0,2019-05-31T17:54:44Z,2019-05-31T21:54:44.685122992Z,16512.4


#group,false,false,true,true,false
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,double
#default,,,,,
,result,table,_start,_stop,reads_kb
,,0,2019-05-31T17:54:44Z,2019-05-31T21:54:44.685122992Z,11111.4


#group,false,false,true,true,false
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,double
#default,writes_kb,,,,
,result,table,_start,_stop,execution_sec
,,0,2019-05-31T17:54:44Z,2019-05-31T21:54:44.685122992Z,22222.4

#group,false,false,true,true,false
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,long
#default,api_count,,,,
,result,table,_start,_stop,api_count
,,0,2019-05-31T17:54:44Z,2019-05-31T21:54:44.685122992Z,1125


The table gets parsed as
Screen Shot 2019-05-31 at 3 14 09 PM

Because each of my results are a single stat, I would expect the data for each of those columns to be an array of length 1, rather than an array of length 4.

@chnn
Copy link
Contributor

chnn commented Jun 3, 2019

This is intentional, but maybe there's something more sensible that should happen instead. The fromFlux function concats individual Flux tables into one large sparse table (see comment here, this operation is known as a spread/recast/pivot in other libraries).

At a high level, what are you trying to achieve with the vis library? I'm up for a quick call about this sometime today.

@chnn
Copy link
Contributor

chnn commented Jun 12, 2019

Talked with @ischolten about this. The output of the Flux parsing is a bit strange for her use case, but she has a reasonable workaround.

Going to close this for now.

@chnn chnn closed this as completed Jun 12, 2019
@chnn chnn self-assigned this Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants