-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
cannot get property correctly #3793
Labels
bug
For bugs or other software errors
Comments
Thanks for the report. Can you provide a minimal reproducible example that demonstrates the issue? |
Hi domoritz, {
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A timeline visualization of the lives of the first five U.S. presidents.",
"data": [
{
"name": "testdata",
"values": [
{
"_index": "metrics-otel-v1-2023.09.06",
"_type": "_doc",
"_id": "_YH3aIoBwqxJSF1N_aqW",
"_source": {
"kind": "SUMMARY",
"count": 5,
"flags": 0,
"description": "POC metrics for outbound request",
"sum": 7.003,
"name": "outbound_request_seconds",
"startTime": "2023-09-06T04:35:22.773Z",
"quantileValuesCount": 2,
"time": "2023-09-06T05:29:52.773Z",
"metric.attributes.pod_id": "p2"
}
},
{
"_index": "metrics-otel-v1-2023.09.06",
"_type": "_doc",
"_id": "_4H3aIoBwqxJSF1N_aqW",
"_source": {
"kind": "SUMMARY",
"count": 5,
"flags": 0,
"description": "POC metrics for outbound request",
"sum": 5.563,
"name": "outbound_request_seconds",
"startTime": "2023-09-06T05:03:22.773Z",
"quantileValuesCount": 2,
"time": "2023-09-06T05:29:52.773Z",
"metric.attributes.pod_id": "p1"
}
}
],
"transform": [
{
"type": "filter",
"expr": "datum._source.name == 'outbound_request_seconds'"
}
]
},
{
"name": "groupbyPod",
"source": "testdata",
"transform": [
{
"type": "aggregate",
"ops": [
"sum"
],
"fields": [
"_source.count"
],
"as": [
"s1"
],
"groupby": [
"_source.metric.attributes.pod_id"
]
}
]
}
]
} |
There are no marks in your sample spec. Regardless, I think you just need to escape any property names containing . with \\. e.g. "_source\\.metric\\.attributes\\.pod_id" |
Thank you very much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use VIGA edit tool,run the below json, it will get error message "Cannot read properties of undefined (reading ‘attributes’)" .
If the ‘metric.attributes.pod_id’ is replaced with ‘pod_id’, it works.
The text was updated successfully, but these errors were encountered: