This seems to be a common problem. Is there documentation or an example someone could point me to?
My VEGA schema contains a format for non-aggregate query results
data: {
url: {
index: myIndex
"body": {
"size": 10, "_source": ["objectField", "dateField"]
}
},
"format": {"property": "hits.hits"}
}
So the VEGA Debug portion shows the _source field in the table as expected.
"hits": {
"total": 7,
"max_score": 1,
"hits": [
{
"_index": "myIndex",
"_id": "20250824",
"_score": 1,
"_source": {
"dateField": "2025-08-24T00:00:00Z",
"objectField": [
{
"count": 9298,
"id": "202509011839-0"
},
{
"count": 8512,
"id": "202509011038-0"
},
Naturally, we would like to unpack this data using a transform. The _source field is an array of objects, and datum allows us to access the VEGA debug’s table column names. So let’s try using the project transformation.
transform: [
{
"type": "project",
"fields": [
"datum._source.dateField",
"datum._source.objectField",
],
"as": ["dateField", "objectField"]
}
]
My problem is I expect to see the new object fields in my VEGA debug, but nothing changed.
I’ve also tried calculate as suggested in Vega Boxplot - referencing properties in _source (infinite extent error)
{
calculate: "datum._source.dateField",
as: "dateField"
}
But still, nothing happens.