Ask Your Question
0

How to configure Snowflake jdbc consumer

asked 2021-09-17 09:53:34 -0500

Jordi gravatar image

Hi,

I tried to connect a jdbc consumer to snowflake, but it wouln't work. I used the same driver, connection string and driver parameters as for another database connection,. i.e. DBVisualizer:

Driver: snowflake-jdbc-3.13.6.jar

connection string: jdbc:snowflake://<server>:<port>/?&warehouse="warehouse"&db="database"&schema="schema"&ssl=on

jdbc parameters:

ssl = 0

AuthMech = 3

AllowSelfSignedCerts = 1

Initial query: USE ROLE "role"

In DBVisualizer it worked, but Streamsets throughs following error:

JDBC_06 - Failed to initialize connection pool: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: null
    at com.streamsets.pipeline.lib.jdbc.JdbcUtil.createDataSourceForRead(JdbcUtil.java:1058)
    at com.streamsets.pipeline.stage.origin.jdbc.JdbcSource.init(JdbcSource.java:243)
    at com.streamsets.pipeline.api.base.BaseStage.init(BaseStage.java:48)
    at com.streamsets.pipeline.api.base.configurablestage.DStage.init(DStage.java:36)
    at com.streamsets.datacollector.runner.StageRuntime.lambda$init$0(StageRuntime.java:220)
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoaderInternal(LambdaUtil.java:148)
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoader(LambdaUtil.java:44)
    at com.streamsets.datacollector.runner.StageRuntime.init(StageRuntime.java:218)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:109)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:44)
    at com.streamsets.datacollector.runner.Pipeline.initPipe(Pipeline.java:411)
    at com.streamsets.datacollector.runner.Pipeline.init(Pipeline.java:314)
    at com.streamsets.datacollector.runner.preview.PreviewPipeline.run(PreviewPipeline.java:49)
    at com.streamsets.datacollector.execution.preview.sync.SyncPreviewer.start(SyncPreviewer.java:238)
    at com.streamsets.datacollector.execution.preview.async.AsyncPreviewer.lambda$start$1(AsyncPreviewer.java:105)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:34)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:34)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: null
    at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:576)
    at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:555)
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
    at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
    at com.streamsets.pipeline.lib.jdbc.JdbcUtil.createDataSourceForRead(JdbcUtil.java:1052)
    ... 27 more
Caused by: net.snowflake.client.jdbc.SnowflakeLoggedFeatureNotSupportedException
    at net.snowflake.client.jdbc.SnowflakeConnectionV1.setReadOnly(SnowflakeConnectionV1.java:344)
    at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:414)
    at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:374)
    at com ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-17 10:19:04 -0500

Jordi gravatar image

The Problem was solved by de-activting the option "Enforce Read-only Connection" in the "Advanced"- tab of the jdbc consumer.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-09-17 09:53:34 -0500

Seen: 154 times

Last updated: Sep 17