Try to add property default.xxx to your jdbc interpreter setting. Great Info <gubt...@gmail.com> 于2021年11月28日周日 下午2:24写道:
> > Hi, > I am trying to configure jdbc(sql) to connect to snowflake, I need to add > some extra properties related to some sssk keypair like > *prop.put("privateKey", > PrivateKeyReader.get(PRIVATE_KEY_FILE)); * > I tried below code in java, it works but how to add same in Zeppelin ? I > could not see any option to add extra option in jdbc interceptors . Is it > possible to add these extra props? > > > > String url = "jdbc:snowflake://<account_identifier>.snowflakecomputing.com"; > Properties prop = new Properties(); > prop.put("user", "<user>"); > prop.put("privateKey", PrivateKeyReader.get(PRIVATE_KEY_FILE)); > prop.put("db", "<database_name>"); > prop.put("schema", "<schema_name>"); > prop.put("warehouse", "<warehouse_name>"); > prop.put("role", "<role_name>"); > > Connection conn = DriverManager.getConnection(url, prop); > Statement stat = conn.createStatement(); > ResultSet res = stat.executeQuery("select 1"); > res.next(); > System.out.println(res.getString(1)); > conn.close(); > > -- Best Regards Jeff Zhang