fix(SqlLab): Hit tableschemaview with a valid queryEditorId (#35341)

This commit is contained in:
Geidō
2025-10-01 14:39:02 +03:00
committed by GitHub
parent 19db0353a9
commit a66c230058
3 changed files with 263 additions and 12 deletions

View File

@@ -1017,12 +1017,13 @@ export function runTablePreviewQuery(newTable, runPreviewOnly) {
};
}
export function syncTable(table, tableMetadata) {
export function syncTable(table, tableMetadata, finalQueryEditorId) {
return function (dispatch) {
const finalTable = { ...table, queryEditorId: finalQueryEditorId };
const sync = isFeatureEnabled(FeatureFlag.SqllabBackendPersistence)
? SupersetClient.post({
endpoint: encodeURI('/tableschemaview/'),
postPayload: { table: { ...tableMetadata, ...table } },
postPayload: { table: { ...tableMetadata, ...finalTable } },
})
: Promise.resolve({ json: { id: table.id } });