-
Notifications
You must be signed in to change notification settings - Fork 130
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
Mv rows export #7081
base: main
Are you sure you want to change the base?
Mv rows export #7081
Conversation
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 needs to update the
MetricsViewRows
RPC to use themetricsview
package (to fix the original bug) - Can you also add some tests in
runtime/resolvers/testdata
for the rows logic? Especially to check the measure filter support that was originally reported. I.e. have tests like:
...
tests:
- name: metrics rows with a measure-based filter
resolver: metrics
properties:
metrics_view: foo
rows: true
...
I thought UI can switch to mv agg API and we can deprecate |
require.Equal(t, []string{"2022-01-01T14:49:50.459Z", "", "msn.com", "2", "4", "2", "cars", "", "1", "iphone"}, rows[1][2:]) | ||
require.Equal(t, []string{"2022-01-02T11:58:12.475Z", "Yahoo", "yahoo.com", "2", "4", "1", "cars", "1", "1"}, rows[2][2:]) | ||
require.Equal(t, []string{"timestamp", "publisher", "domain", "bid_price", "volume", "impressions", "ad words", "clicks", "numeric_dim", "device"}, rows[0][1:]) | ||
require.Equal(t, []string{"1/1/22 14:49", "", "msn.com", "2", "4", "2", "cars", "", "1", "iphone"}, rows[1][1:]) |
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.
metricsview_rows export marshals values before writing like
func convertToXLSXValue(pbvalue *structpb.Value) (interface{}, error) {
switch pbvalue.GetKind().(type) {
case *structpb.Value_StructValue:
bts, err := protojson.Marshal(pbvalue)
if err != nil {
return "", err
}
return string(bts), nil
case *structpb.Value_NullValue:
return "", nil
default:
return pbvalue.AsInterface(), nil
}
}
however mv agg export does not thats why the date format is of excel format.
Fixes https://github.com/rilldata/rill-private-issues/issues/1342
Checklist: