我尝试将查询连接到远程 postgres 数据库 -
%psql.sql
select * from my_schema.my_table limit 5
我已经更新了解释器的值,但我仍然收到以下错误 -
java.lang.NullPointerException 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.interpret(PostgreSqlInterpreter.java:288) 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.executeSql(PostgreSqlInterpreter.java:201) 在 org.apache.zeppelin。 org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer. java:302) 在 org.apache.zeppelin.scheduler.Job.run(Job.java:171) 在 org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139) 在 java.util.concurrent。 Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 在 java.util.concurrent.ThreadPoolExecutor 的 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)。 runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)
我尝试从 shell 访问,但出现错误 -
进程因错误退出:2(退出值:2)
我怀疑这与它试图获取密码的事实有关。但是,相同的命令 + 密码可以在我的终端上使用。
另一个相关问题是解释器中的属性不包含数据库名称。我将其添加为,postgresql.database
但我不确定是否使用了此属性。
如果您知道如何解决,请告诉我,谢谢!