Skip to content
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

[BUG] Can't render the data when the field values are indexed with numbers in the data object #94

Open
kjcho-msft opened this issue Apr 3, 2023 · 0 comments

Comments

@kjcho-msft
Copy link

Issue:
When the data in outputs are indexed with numbers, data-explorer can't render the output correctly.

        "application/vnd.dataresource+json": {
          "schema": {
            "fields": [
              {
                "name": "name"
              },
              {
                "name": "type"
              },
              {
                "name": "note"
              }
            ]
          },
          "data": [
            {
              "0": "aa",
              "1": "bb",
              "2": "cc"
            }
          ]
        }
      }

This is how it is rendered:
image

Here is an example of the notebook. You can use this to reproduce the issue:

{
  "metadata": {
    "kernelspec": {
      "name": "SQL",
      "display_name": "SQL",
      "language": "sql"
    },
    "language_info": {
      "name": "sql",
      "version": ""
    }
  },
  "nbformat_minor": 2,
  "nbformat": 4,
  "cells": [
    {
      "cell_type": "code",
      "source": [
        "test"
      ],
      "metadata": {
        "azdata_cell_guid": "286d911b-c759-489c-b7f8-5490479dbddd",
        "language": "sql",
        "tags": []
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "metadata": {},
          "execution_count": 4,
          "data": {
            "application/vnd.dataresource+json": {
              "schema": {
                "fields": [
                  {
                    "name": "name"
                  },
                  {
                    "name": "type"
                  },
                  {
                    "name": "note"
                  }
                ]
              },
              "data": [
                {
                  "0": "aa",
                  "1": "bb",
                  "2": "cc"
                }
              ]
            }
          }
        }
      ],
      "execution_count": 4
    }
  ]
}

Note that if the data object uses the filed names, it will work correctly.

		"data": [
		  {
			"name": "aa",
			"type": "bb",
			"note": "cc"
		  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant