From c0ac50e42b7a4dbc8b1140454f86af59e311d65d Mon Sep 17 00:00:00 2001 From: yuki-tashiro <43487435+yu-kioo@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:42:33 +0000 Subject: [PATCH] add extra jdbc options parameter --- README.md | 1 + src/main/java/org/embulk/output/DatabricksOutputPlugin.java | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index ecd6363..16163f7 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Databricks output plugin for Embulk loads records to Databricks Delta Table. ## Configuration - **driver_path**: path to the jar file of the JDBC driver. If not set, [the bundled JDBC driver](https://docs.databricks.com/en/integrations/jdbc/index.html) will be used. (string, optional) +- **options**: extra JDBC properties (hash, default: {}) - **server_hostname**: The Databricks compute resource’s Server Hostname value, see [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html). (string, required) - **http_path**: The Databricks compute resource’s HTTP Path value, see [Compute settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/compute.html). (string, required) - **personal_access_token**: The Databaricks personal_access_token, see [Authentication settings for the Databricks JDBC Driver](https://docs.databricks.com/en/integrations/jdbc/authentication.html#authentication-pat). (string, required) diff --git a/src/main/java/org/embulk/output/DatabricksOutputPlugin.java b/src/main/java/org/embulk/output/DatabricksOutputPlugin.java index 3588e58..49132ad 100644 --- a/src/main/java/org/embulk/output/DatabricksOutputPlugin.java +++ b/src/main/java/org/embulk/output/DatabricksOutputPlugin.java @@ -91,6 +91,7 @@ protected JdbcOutputConnector getConnector(PluginTask task, boolean retryableMet props.put("SSL", "1"); props.put("ConnCatalog", t.getCatalogName()); props.put("ConnSchema", t.getSchemaName()); + props.putAll(t.getOptions()); logConnectionProperties(url, props); return new DatabricksOutputConnector( url, props, t.getTransactionIsolation(), t.getCatalogName(), t.getSchemaName());