chore(Databricks): New Databricks driver (#28393)

This commit is contained in:
Vitor Avila
2024-05-09 15:58:03 -03:00
committed by GitHub
parent e6a85c5901
commit 307ebeaa19
6 changed files with 333 additions and 99 deletions

View File

@@ -633,11 +633,23 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
const history = useHistory();
const dbModel: DatabaseForm =
// TODO: we need a centralized engine in one place
// first try to match both engine and driver
availableDbs?.databases?.find(
(available: {
engine: string | undefined;
default_driver: string | undefined;
}) =>
available.engine === (isEditMode ? db?.backend : db?.engine) &&
available.default_driver === db?.driver,
) ||
// alternatively try to match only engine
availableDbs?.databases?.find(
(available: { engine: string | undefined }) =>
// TODO: we need a centralized engine in one place
available.engine === (isEditMode ? db?.backend : db?.engine),
) || {};
) ||
{};
// Test Connection logic
const testConnection = () => {