You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/11/08 17:12:13 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #8531: [docs] Adding Slice parameter documentation

etr2460 commented on a change in pull request #8531: [docs] Adding Slice parameter documentation
URL: https://github.com/apache/incubator-superset/pull/8531#discussion_r344277814
 
 

 ##########
 File path: CONTRIBUTING.md
 ##########
 @@ -840,3 +840,326 @@ Note that:
 * In some cases, you may want to create a context that is more aligned
   to your production environment, and use the similar broker as well as
   results backend configuration
+  
+## Chart Parameters
+
+Chart parameters are stored as a JSON encoded string the `slices.params` column and are often referenced throughout the code as form-data. Currently the form-data is neither versioned nor typed as thus is somewhat free-formed. Note in the future there may be merit in using something like [JSON Schema](https://json-schema.org/) to both annotate and validate the JSON object in addition to using a Mypy `TypedDict` (introduced in Python 3.8) for typing the form-data in the backend. This section serves as a potential primer for that work.
+
+The following tables provide a non-exhausive list of the various fields which can be present in the JSON object grouped by the Explorer pane sections. These values were obtained by extracting the distinct fields from a legacy deployment consisting of tens of thousands of charts and thus some fields may be missing whilst others may be deprecated.
+
+Note not all fields are correctly catagorized. The fields vary based on visualization type and may apprear in different sections depending on the type. Verified deprecated columns may indicate a missing migration and/or prior migrations which were unsucessful and thus future work may be required to clean up the form-data.
+
+### Datasource & Chart Type
+
+| Field             | Type     | Notes                               |
+|-------------------|----------|-------------------------------------|
+| `database_name`   | *string* | *Deprecated?*                       |
+| `datasource`      | *string* | `<datasouce_id>__<datasource_type>` |
+| `datasource_id`   | *string* | *Deprecated?* See `datasource`      |
+| `datasource_name` | *string* | *Deprecated?*                       |
+| `datasource_type` | *string* | *Deprecated?* See `datasource`      |
+| `viz_type`        | *string* | The **Visualization Type** widget   |
+
+### Time
+
+| Field                  | Type            | Notes                                 |
+|------------------------|-----------------|---------------------------------------|
+| `date_filter`          | *N/A*           | *Deprecated?*                         |
+| `date_time_format`     | *N/A*           | *Deprecated?*                         |
+| `druid_time_origin`    | *string*        | The Druid **Origin** widget           |
+| `granularity`          | *string*        | The Druid **Time Granularity** widget |
+| `granularity_sqla`     | *string*        | The SQLA **Time Column** widget       |
+| `time_grain_sqla`      | *string*        | The SQLA **Time Grain** widget        |
+| `time_range`           | *string*        | The **Time range** widget             |
+| `time_range_endpoints` | *array(string)* | Used by SIP-15 [HIDDEN]               |
+
+### GROUP BY
+
+| Field                     | Type            | Notes                       |
+|---------------------------|-----------------|-----------------------------|
+| `include_time`            | *boolean*       | The **Include Time** widget |
+| `metrics`                 | *array(string)* | See Query section           |
+| `order_asc`               | -               | See Query section           |
+| `percent_metrics`         | -               | See Query section           |
+| `row_limit`               | -               | See Query section           |
+| `timeseries_limit_metric` | -               | See Query section           |
+
+
+### NOT GROUPED BY
+
+| Field           | Type            | Notes                   |
+|-----------------|-----------------|-------------------------|
+| `all_columns`   | *array(string)* | The **Columns** widget  |
+| `order_by_cols` | *array(string)* | The **Ordering** widget |
+| `row_limit`     | -               | See Query section       |
+
+### Y Axis 1
+
+| Field           | Type | Notes                                              |
+|-----------------|------|----------------------------------------------------|
+| `metric`        | -    | The **Left Axis Metric** widget. See Query section |
+| `y_axis_format` | -    | See Y Axis section                                 |
+
+## Y Axis 2
 
 Review comment:
   inconsistent header

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org