mirror of
https://github.com/apache/superset.git
synced 2026-07-13 10:15:58 +00:00
fix(sqllab): save datasets with template parameters (#33195)
This commit is contained in:
@@ -1294,7 +1294,8 @@ export function createDatasourceFailed(err) {
|
||||
export function createDatasource(vizOptions) {
|
||||
return dispatch => {
|
||||
dispatch(createDatasourceStarted());
|
||||
const { dbId, catalog, schema, datasourceName, sql } = vizOptions;
|
||||
const { dbId, catalog, schema, datasourceName, sql, templateParams } =
|
||||
vizOptions;
|
||||
return SupersetClient.post({
|
||||
endpoint: '/api/v1/dataset/',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
@@ -1306,6 +1307,7 @@ export function createDatasource(vizOptions) {
|
||||
table_name: datasourceName,
|
||||
is_managed_externally: false,
|
||||
external_url: null,
|
||||
template_params: templateParams,
|
||||
}),
|
||||
})
|
||||
.then(({ json }) => {
|
||||
|
||||
Reference in New Issue
Block a user