问题标签 [hive-hplsql]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
260 浏览

hive - Apache HPLSQL - 运行 HPLSQL 查询时权限被拒绝

我正在尝试使用 hplsql 命令运行查询并收到此错误。这似乎是一个权限问题。我当前登录的用户没有被考虑

我该如何解决?

0 投票
2 回答
515 浏览

hive - 无法从 HIVE cli 运行 HPL/SQL 查询

我试图运行“dbms_output.put_line('This is HPL/Sql');” 从 Hive cli 它给出了以下异常。

失败: ParseException 行 1:0 无法识别“dbms_output”附近的输入。'put_line'

我正在使用 Hive 2.1.0。根据 HPL/sql 文档 HPL/SQL 自 2.0 版起包含在 Apache Hive 中。

在 hive 中启用 hpl/sql 支持是否需要任何其他配置更改。

0 投票
1 回答
426 浏览

hive - Hive hplsql stored procedure cannot insert timestamp values

I try to use Hive HPL/SQL stored procedure's insert data into hive table. But it is unable to insert timestamp value. My table defined as following:

I use the hive cli to insert value without any problem.

but when I use the hplsql to execute the following script:

it throws the following exception:

Unhandled exception in HPL/SQL
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:27 mismatched input '-' expecting ) near '2016' in value row constructor
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:267) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:253) at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:310) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:250) at org.apache.hive.hplsql.Conn.executeSql(Conn.java:110) at org.apache.hive.hplsql.Exec.executeSql(Exec.java:592) at org.apache.hive.hplsql.Stmt.insertValues(Stmt.java:800) at org.apache.hive.hplsql.Stmt.insert(Stmt.java:713) at org.apache.hive.hplsql.Exec.visitInsert_stmt(Exec.java:1116) at org.apache.hive.hplsql.Exec.visitInsert_stmt(Exec.java:52) at org.apache.hive.hplsql.HplsqlParser$Insert_stmtContext.accept(HplsqlParser.java:10330) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70) at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:1009) at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52) at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(HplsqlParser.java:1015) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70) at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBaseVisitor.java:28) at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(HplsqlParser.java:449) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70) at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:916) at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:52) at org.apache.hive.hplsql.HplsqlParser$ProgramContext.accept(HplsqlParser.java:392) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42) at org.apache.hive.hplsql.Exec.run(Exec.java:771) at org.apache.hive.hplsql.Exec.run(Exec.java:747) at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:27 mismatched input '-' expecting ) near '2016' in value row constructor at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:394) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:199) at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:282) at org.apache.hive.service.cli.operation.Operation.run(Operation.java:334) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:505) at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:492) at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78) at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) at com.sun.proxy.$Proxy38.executeStatementAsync(Unknown Source) at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:297) at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:506) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437) at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 2:27 mismatched input '-' expecting ) near '2016' in value row constructor at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:207) at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:465) at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1301) at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1279) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)

Any idea why?

Thanks,

0 投票
0 回答
66 浏览

plsql - 是否可以使用 hplsql -f package.sql 在 hplsql 命令下运行 plsql 包

我正在尝试运行一个 PL/SQL 包,其中包含一个带有游标(带参数)的过程以及带有 3 个参数的过程,它在 hplsql 中是否可以正常工作。

就像是:

0 投票
0 回答
206 浏览

oracle - 如何使用映射对象将 ORACLE 表导入 HIVE HPL/SQL

我正在使用 hplsql-0.3.31 使用 MAP OBJECT 功能从 ORACLE 数据库导入表数据。我可以成功导入对象并打印它的值。但是,如果我将此对象与任何配置单元表/光标一起使用,代码会给我错误。

这是一个示例代码(test_ora_cursor.sql)

hplsql-site.xml

我希望在 Cursor 中导入 ORDR_ID,以便我可以使用这些值来按业务逻辑操作配置单元表。但我得到以下例外:

0 投票
0 回答
295 浏览

hadoop - Crystal Reports 与 Hadoop/Hive/HPLSQL 的集成

我们正在将数据从 Oracle 迁移到 Hadoop,并且需要继续使用现有的报告工具(Crystal Report)从 Hadoop(而不是 Oracle)生成报告

在当前场景中,我们使用 Oracle 存储过程来执行少量聚合/逻辑。现在有了上述要求和迁移的数据,我们考虑的选项是

  1. 使用HPLSQL(而不是 Oracle PLSQL)并从 Crystal Reports 调用它。但是,这种方法似乎存在挑战,因为与 Oracle Stored Procs 不同, HPLSQLStored Procs 未在 DB 目录中注册,因此 Crystal 报表可能无法找到/访问那些HPLSQL存储过程。

  2. 在 java 中创建自定义聚合/逻辑并将其公开为可以从 Crystal Reports 调用/使用的 Web 服务

这里需要的帮助/指导是找出是否

a) 是否有人成功调用了HPLSQL存储过程,形成了外部工具/报告,例如 Crystal over ODBC/JDBC。如果是的话,你能分享一下细节吗?

b) 除了上述两个选项之外,是否有更好的选项来达到要求?

c) 使用 Web 服务获取数据和运行报告是否有任何挑战

在此先感谢,非常感谢任何帮助。

0 投票
1 回答
591 浏览

oracle - PRAGMA AUTONOMOUS_TRANSACTION

我有带有 PRAGMA AUTONOMOUS_TRANSACTION 的过程 A 来记录主程序的活动。

现在我在程序 B 中调用该程序 A 以在程序 B 中记录活动过程。如果程序 A 中发生任何错误,它也会使程序 B 失败。如何避免主程序失败 B.

0 投票
1 回答
108 浏览

sql-server - 将 SQL Server 上的存储过程迁移到 HPL/SQL(Hadoop 生态系统)

我有一个项目需要将所有存储过程从 SQL Server 迁移到 Hadoop 生态系统。

所以主要的一点让我担心如果 HPL/SQL 像http://www.hplsql.org/new那样被终止或者不是最新的。它显示了 HPL/SQL 0.3.31-September 2011,2017 的最新更新功能

有没有人使用过这个开源工具,根据你的经验,这种迁移是可行的吗?非常感谢您的分享。