Get rows from data table

Hello guys! I'm struggling to get the rows array from a data table visualization.

First of all: I want to avoid making request to elasticsearch from my backend and compose the result by myself cause I think I can reuse the existing data. I know how to fetch the same data and the query to be used but it's not my desired logic.

If I have one or more data tables vis already rendered into my view, Is there a way to get rows from the visualizations handler?

EmbeddedVisualizeHandler {
   _element: ...
   _firstRenderComplete: ...
   _listeners: ...
   _scope: ...

The problem comes from I want to get the a similar content like when we click in download csv content from saveAs.

As I can see here

What I'm looking for is $scope.table.rows, so my question is How to access $scope.table.rows out of the Kibana directive code? I have the visualization object, the handler, etc ..

Thanks in advance,


there is currently no option via the handler and vis loader to reach the data within the visualization. We are also not planning to add such an interface, since we have no knowledge about the data inside the visualization (if it is even using any), it might not be in a tabular format, etc.

Dirty workaround from 6.4 onwards! :radioactive:

There is a dirty workaround, that you can use, if you have access to the Vis instance, which I don't recommend and this might never work in a backward compatible manner. If you've got access to the Vis instance of that visualization, you can use the attached data adapter, which is used to log the data for the inspector and get your data from it, something like that:

Which would return a promise that resolves with a table of the data. But since we are not making any guarantee on this API the format might change in upcoming versions (though no current plans to do so).


Ok Tim thanks for your response. One more thing, Have you got a raw response parser implemented? I need to implement one by myself but I think you could have something into your code which parse an elastic raw response from a data table request...

Thanks in advance,


you can try having a look at tabify which is what we are currenlty using. But you should neither consider that a public API. In fact we know we'll change the output format in one of the upcoming versions (


Yep, I was looking into it hahaha. Thanks Tim I'll write here again if I'm facing troubles.
BTW awesome work with Kibana.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.