chore: Refactor ExploreMixin to power both Datasets (SqlaTable) and Query models (#22853)

This commit is contained in:
Hugh A. Miles II
2023-04-10 16:32:52 -04:00
committed by GitHub
parent b44d20348d
commit d581d698b6
10 changed files with 413 additions and 967 deletions

View File

@@ -61,7 +61,7 @@ export type ExploreQuery = QueryResponse & {
};
export interface ISimpleColumn {
name?: string | null;
column_name?: string | null;
type?: string | null;
is_dttm?: boolean | null;
}
@@ -216,7 +216,7 @@ export const SaveDatasetModal = ({
...formDataWithDefaults,
datasource: `${datasetToOverwrite.datasetid}__table`,
...(defaultVizType === 'table' && {
all_columns: datasource?.columns?.map(column => column.name),
all_columns: datasource?.columns?.map(column => column.column_name),
}),
}),
]);
@@ -301,7 +301,7 @@ export const SaveDatasetModal = ({
...formDataWithDefaults,
datasource: `${data.table_id}__table`,
...(defaultVizType === 'table' && {
all_columns: selectedColumns.map(column => column.name),
all_columns: selectedColumns.map(column => column.column_name),
}),
}),
)