You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let result = traverse(data._source, report._source.selectedFields)
The traverse logic aims to find the data fields by matching the selected fields. Selected metaData fields will be saved in selected fields, this part is fine. The issue is with the data._source
The following is an example of the data object, and you can see metadata fields are in the data object, but the data._source field we passed to traverse()for matching will not include the metaData fields anyways.
@joshuali925 I notice that before your PR to fix the csv rendering nested fields, it was using data not data.source when traverse(), which contained the metadata fields. Is it straightforward to add it back?
ref: metaData fields
When user selected metadata fields like "_index", "_type" in Discover, it will not appear in csv reports, without throwing any error.
Root cause
https://github.com/opensearch-project/dashboards-reports/blob/56008de1dd447b3b4967e9abdea692e1b4036119/dashboards-reports/server/routes/utils/dataReportHelpers.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L194
The traverse logic aims to find the data fields by matching the
selected fields
. Selected metaData fields will be saved inselected fields
, this part is fine. The issue is with thedata._source
The following is an example of the
data
object, and you can see metadata fields are in the data object, but thedata._source
field we passed totraverse()
for matching will not include the metaData fields anyways.The text was updated successfully, but these errors were encountered: