fix(sqllab): save datasets with template parameters (#33195)

This commit is contained in:
ethan-l-geotab
2025-05-30 18:57:33 -04:00
committed by GitHub
parent 401ce56fa1
commit c09f8f6f76
5 changed files with 130 additions and 9 deletions

View File

@@ -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 }) => {