Skip to content

Commit

Permalink
Merge pull request #77 from axiomhq/transform-long-to-wide
Browse files Browse the repository at this point in the history
transform long format to wide format
  • Loading branch information
dasfmi authored Oct 17, 2024
2 parents ac1505f + b75c099 commit 1b9a321
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axiom-datasource",
"version": "0.5.1",
"version": "0.5.2",
"description": "Query Axiom through Grafana",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
Expand Down
5 changes: 5 additions & 0 deletions pkg/plugin/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ func (d *Datasource) query(ctx context.Context, query concurrent.Query) backend.
} else {
frame = buildFrame(ctx, &result.Tables[0])
}

newFrame, err = data.LongToWide(frame, nil)
if err != nil {
log.DefaultLogger.Error("transformation from long to wide failed", err.Error())
}
} else {
logger.Debug("buildFrameSeries for Matches")
frame = buildFrame(ctx, &result.Tables[0])
Expand Down

0 comments on commit 1b9a321

Please sign in to comment.