Skip to content

Commit 71e546e

Browse files
kentoyoshidaclaude
andcommitted
Add jdbc_tracing configuration option to control Snowflake JDBC driver logging
- Add jdbc_tracing parameter to SnowflakePluginTask interface with default value "INFO" - Set tracing property in JDBC connection properties based on configuration - Update README documentation with new configuration option - Allows users to control verbosity of Snowflake JDBC driver logs (OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f612567 commit 71e546e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Snowflake output plugin for Embulk loads records to Snowflake.
2525
- **max_retry_wait**: upper limit of retry wait, which will be doubled at every retry (integer, default: 1800000 (30 minutes))
2626
- **max_upload_retries**: maximum number of retries for file upload to Snowflake (integer, default: 3).
2727
- **max_copy_retries**: maximum number of retries for COPY operations in Snowflake (integer, default: 3). Retries occur when transient errors such as communication failures happen during the COPY process.
28+
- **jdbc_tracing**: JDBC driver logging level. This controls the verbosity of Snowflake JDBC driver logs. Valid values are: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL (string, default: "INFO").
2829
- **mode**: "insert", "insert_direct", "truncate_insert", "replace" or "merge". See below. (string, required)
2930
- **merge_keys**: key column names for merging records in merge mode (string array, required in merge mode if table doesn't have primary key)
3031
- **merge_rule**: list of column assignments for updating existing records used in merge mode, for example `"foo" = T."foo" + S."foo"` (`T` means target table and `S` means source table). (string array, default: always overwrites with new values)

src/main/java/org/embulk/output/SnowflakeOutputPlugin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ public interface SnowflakePluginTask extends PluginTask {
9191
@ConfigDefault("\"none\"")
9292
public MatchByColumnName getMatchByColumnName();
9393

94+
@Config("jdbc_tracing")
95+
@ConfigDefault("\"INFO\"")
96+
public String getJdbcTracing();
97+
9498
public void setCopyIntoTableColumnNames(String[] columnNames);
9599

96100
public String[] getCopyIntoTableColumnNames();
@@ -198,6 +202,8 @@ protected JdbcOutputConnector getConnector(PluginTask task, boolean retryableMet
198202
props.setProperty("CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX", "true");
199203
props.setProperty("MULTI_STATEMENT_COUNT", "0");
200204

205+
props.setProperty("tracing", t.getJdbcTracing());
206+
201207
props.putAll(t.getOptions());
202208

203209
logConnectionProperties(url, props);

0 commit comments

Comments
 (0)