diff --git a/app/server/.run/ServerApplication.run.xml b/app/server/.run/ServerApplication.run.xml
index ae3fda8ef5..96810c4929 100644
--- a/app/server/.run/ServerApplication.run.xml
+++ b/app/server/.run/ServerApplication.run.xml
@@ -5,7 +5,7 @@
-
+
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/PluginConstants.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/PluginConstants.java
index 8d5aebfead..37fc3534a8 100644
--- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/PluginConstants.java
+++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/PluginConstants.java
@@ -15,6 +15,7 @@ public interface PluginConstants {
String OPEN_AI_PLUGIN = "openai-plugin";
String ANTHROPIC_PLUGIN = "anthropic-plugin";
String GOOGLE_AI_PLUGIN = "googleai-plugin";
+ String DATABRICKS_PLUGIN = "databricks-plugin";
}
public static final String DEFAULT_REST_DATASOURCE = "DEFAULT_REST_DATASOURCE";
@@ -41,6 +42,7 @@ public interface PluginConstants {
public static final String OPEN_AI_PLUGIN_NAME = "Open AI";
public static final String ANTHROPIC_PLUGIN_NAME = "Anthropic";
public static final String GOOGLE_AI_PLUGIN_NAME = "Google AI";
+ public static final String DATABRICKS_PLUGIN_NAME = "Databricks";
}
interface HostName {
diff --git a/app/server/appsmith-plugins/databricksPlugin/pom.xml b/app/server/appsmith-plugins/databricksPlugin/pom.xml
new file mode 100644
index 0000000000..5170b66bee
--- /dev/null
+++ b/app/server/appsmith-plugins/databricksPlugin/pom.xml
@@ -0,0 +1,104 @@
+
+
+ 4.0.0
+
+ com.appsmith
+ appsmith-plugins
+ 1.0-SNAPSHOT
+
+
+ com.external.plugins
+ databricksPlugin
+ 1.0-SNAPSHOT
+ databricksPlugin
+ http://maven.apache.org
+
+
+
+ com.databricks
+ databricks-sdk-java
+ 0.14.0
+
+
+ com.databricks
+ databricks-jdbc
+ 2.6.36
+
+
+ com.zaxxer
+ HikariCP
+ 5.0.1
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson-bom.version}
+ provided
+
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jdk8
+ ${jackson-bom.version}
+
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-bom.version}
+
+
+ com.google.guava
+ guava
+ 32.0.1-jre
+
+
+
+
+ io.projectreactor
+ reactor-test
+ 3.2.11.RELEASE
+ test
+
+
+ org.mockito
+ mockito-core
+ 3.1.0
+ test
+
+
+
+
+
+
+
+ maven-shade-plugin
+
+
+ maven-dependency-plugin
+
+
+ copy-dependencies
+
+ copy-dependencies
+
+ package
+
+ runtime
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+
diff --git a/app/server/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java b/app/server/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java
new file mode 100644
index 0000000000..fd82863f2f
--- /dev/null
+++ b/app/server/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java
@@ -0,0 +1,331 @@
+package com.external.plugins;
+
+import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginError;
+import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginException;
+import com.appsmith.external.exceptions.pluginExceptions.StaleConnectionException;
+import com.appsmith.external.models.ActionConfiguration;
+import com.appsmith.external.models.ActionExecutionResult;
+import com.appsmith.external.models.BearerTokenAuth;
+import com.appsmith.external.models.DatasourceConfiguration;
+import com.appsmith.external.models.DatasourceStructure;
+import com.appsmith.external.plugins.BasePlugin;
+import com.appsmith.external.plugins.PluginExecutor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.ObjectUtils;
+import org.pf4j.Extension;
+import org.pf4j.PluginWrapper;
+import org.springframework.util.StringUtils;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Schedulers;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+import static com.appsmith.external.exceptions.pluginExceptions.BasePluginErrorMessages.CONNECTION_CLOSED_ERROR_MSG;
+import static com.appsmith.external.exceptions.pluginExceptions.BasePluginErrorMessages.CONNECTION_INVALID_ERROR_MSG;
+import static com.appsmith.external.exceptions.pluginExceptions.BasePluginErrorMessages.CONNECTION_NULL_ERROR_MSG;
+import static com.appsmith.external.helpers.PluginUtils.getColumnsListForJdbcPlugin;
+import static com.external.plugins.exceptions.DatabricksErrorMessages.QUERY_EXECUTION_FAILED_ERROR_MSG;
+import static com.external.plugins.exceptions.DatabricksPluginError.QUERY_EXECUTION_FAILED;
+
+public class DatabricksPlugin extends BasePlugin {
+
+ private static final String JDBC_DRIVER = "com.databricks.client.jdbc.Driver";
+ public static final int VALIDITY_CHECK_TIMEOUT = 5;
+ private static final int INITIAL_ROWLIST_CAPACITY = 50;
+ private static final int CATALOG_INDEX = 2;
+ private static final int SCHEMA_INDEX = 3;
+ private static final int CONFIGURATION_TYPE_INDEX = 0;
+ private static final int JDBC_URL_INDEX = 5;
+ private static final long DEFAULT_PORT = 443L;
+ private static final int HTTP_PATH_INDEX = 1;
+ private static final String FORM_PROPERTIES_CONFIGURATION = "FORM_PROPERTIES_CONFIGURATION";
+ private static final String JDBC_URL_CONFIGURATION = "JDBC_URL_CONFIGURATION";
+
+ private static final String TABLES_QUERY =
+ """
+ SELECT TABLE_SCHEMA as schema_name, table_name,
+ column_name, data_type, is_nullable,
+ column_default
+ FROM system.INFORMATION_SCHEMA.COLUMNS where table_schema <> 'information_schema'
+ """;
+
+ public DatabricksPlugin(PluginWrapper wrapper) {
+ super(wrapper);
+ }
+
+ @Slf4j
+ @Extension
+ public static class DatabricksPluginExecutor implements PluginExecutor {
+
+ @Override
+ public Mono execute(
+ Connection connection,
+ DatasourceConfiguration datasourceConfiguration,
+ ActionConfiguration actionConfiguration) {
+
+ String query = actionConfiguration.getBody();
+
+ List