fix: add form data for empty state control to save dataset (#21944)

This commit is contained in:
Phillip Kelley-Dotson 2022-10-28 11:43:42 -07:00 committed by GitHub
parent 7f563cf92d
commit d3f930a557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -66,6 +66,12 @@ export interface ISimpleColumn {
is_dttm?: boolean | null;
}
export type Database = {
backend: string;
id: number;
parameter: object;
};
export interface ISaveableDatasource {
columns: ISimpleColumn[];
name: string;
@ -73,6 +79,7 @@ export interface ISaveableDatasource {
sql: string;
templateParams?: string | object | null;
schema?: string | null;
database?: Database;
}
interface SaveDatasetModalProps {
@ -283,7 +290,7 @@ export const SaveDatasetModal = ({
createDatasource({
schema: datasource.schema,
sql: datasource.sql,
dbId: datasource.dbId,
dbId: datasource.dbId || datasource?.database?.id,
templateParams,
datasourceName: datasetName,
columns: selectedColumns,