villebro commented on issue #13476:
URL: https://github.com/apache/superset/issues/13476#issuecomment-793978190


   While the endpoint is pretty versatile, it's not really designed for `select 
* from table` type queries. If you're using the chart data endpoint 
programmatically, you can first fire off a query to get all columns in the 
table like so:
   ```json
   {
      "datasource": {
         "id": 1,
         "type": "table"
      },
      "queries": [
         {
            "result_type": "columns"
         }
      ]
   }
   ```
   This will render the following payload:
   ```json
   {
     "result": [
       {
         "data": [
           {
             "column_name": "source",
             "verbose_name": null,
             "dtype": 1
           },
           {
             "column_name": "target",
             "verbose_name": null,
             "dtype": 1
           },
           {
             "column_name": "value",
             "verbose_name": null,
             "dtype": 0
           }
         ]
       }
     ]
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to