mirror of https://github.com/apache/superset.git
fix(schedule-query): getUISchema function called in SchemaForm component (#20256)
* Revert "Superset - Release and Improvements (12-05-2022)"
* merging conflic changes
* Revert "Revert "Superset - Release and Improvements (12-05-2022)""
This reverts commit 6d18661e03
.
* fixed breaking changes
* sync with master
* fixed breaking flows
* fixed getUISchema function call
* added default placeholder and updated docs
* fixed format and comments
* changed flag to configuration
* fix: indentation of SCHEDULED_QUERIES dict
* fix: changed intendation for SCHEDULED_QUERIES
* fix: updated docs for SCHEDULED_QUERIES
* fix: replaced button to menu item for SCHEDULED_QUERIES
* fix: updated docs for SCHEDULED_QUERIES
* fix: trailing whitespace
This commit is contained in:
parent
59491f5396
commit
4137fe03a0
|
@ -391,15 +391,13 @@ You can optionally allow your users to schedule queries directly in SQL Lab. Thi
|
|||
extra metadata to saved queries, which are then picked up by an external scheduled (like
|
||||
[Apache Airflow](https://airflow.apache.org/)).
|
||||
|
||||
To allow scheduled queries, add the following to your configuration file:
|
||||
To allow scheduled queries, add the following to `SCHEDULED_QUERIES` in your configuration file:
|
||||
|
||||
```python
|
||||
FEATURE_FLAGS = {
|
||||
# Configuration for scheduling queries from SQL Lab. This information is
|
||||
# collected when the user clicks "Schedule query", and saved into the `extra`
|
||||
# field of saved queries.
|
||||
SCHEDULED_QUERIES = {
|
||||
# This information is collected when the user clicks "Schedule query",
|
||||
# and saved into the `extra` field of saved queries.
|
||||
# See: https://github.com/mozilla-services/react-jsonschema-form
|
||||
'SCHEDULED_QUERIES': {
|
||||
'JSONSCHEMA': {
|
||||
'title': 'Schedule',
|
||||
'description': (
|
||||
|
@ -472,13 +470,12 @@ FEATURE_FLAGS = {
|
|||
'https://airflow.example.com/admin/airflow/tree?'
|
||||
'dag_id=query_${id}_${extra_json.schedule_info.output_table}'
|
||||
),
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
This feature flag is based on
|
||||
This configuration is based on
|
||||
[react-jsonschema-form](https://github.com/mozilla-services/react-jsonschema-form) and will add a
|
||||
button called “Schedule Query” to SQL Lab. When the button is clicked, a modal will show up where
|
||||
menu item called “Schedule” to SQL Lab. When the menu item is clicked, a modal will show up where
|
||||
the user can add the metadata required for scheduling the query.
|
||||
|
||||
This information can then be retrieved from the endpoint `/savedqueryviewapi/api/read` and used to
|
||||
|
|
|
@ -197,7 +197,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
|
|||
<StyledJsonSchema>
|
||||
<SchemaForm
|
||||
schema={getJSONSchema()}
|
||||
uiSchema={getUISchema}
|
||||
uiSchema={getUISchema()}
|
||||
onSubmit={onScheduleSubmit}
|
||||
validate={getValidator()}
|
||||
>
|
||||
|
|
|
@ -237,6 +237,9 @@ SHOW_STACKTRACE = True
|
|||
ENABLE_PROXY_FIX = False
|
||||
PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}
|
||||
|
||||
# Configuration for scheduling queries from SQL Lab.
|
||||
SCHEDULED_QUERIES: Dict[str, Any] = {}
|
||||
|
||||
# ------------------------------
|
||||
# GLOBALS FOR APP Builder
|
||||
# ------------------------------
|
||||
|
|
Loading…
Reference in New Issue