通过 simba jdbc 驱动程序访问 BigQuery 存储过程

BigQuery stored procedure access through simba jdbc driver

全部, 我正在尝试使用 jdbc 连接在 google bigquery 中执行存储过程,但没有成功。

我按照这里的例子 https://cloud.google.com/blog/products/data-analytics/command-and-control-now-easier-in-bigquery-with-scripting-and-stored-procedures

我能够从 bigquery web 创建和调用存储过程 ui 但是当我使用 simba 驱动程序在 intellij 中设置数据源时 https://blog.jetbrains.com/datagrip/2018/07/10/using-bigquery-from-intellij-based-ide/

然后当我运行调用执行存储过程

DECLARE target_employee_id INT64 DEFAULT 9;
DECLARE employee_hierarchy ARRAY<INT64>;
dataset.GetEmployeeHierarchy(target_employee_id, employee_hierarchy);
SELECT target_employee_id, employee_hierarchy;

我收到一个错误

[HY000][100032] [Simba][BigQueryJDBCDriver](100032) Error executing query job. Message: Unrecognized name: target_employee_id at [1:8] com.simba.googlebigquery.support.exceptions.GeneralException: [Simba][BigQueryJDBCDriver](100032) Error executing query job. Message: Unrecognized name: target_employee_id at [1:8]

由于存储过程支持处于预发布测试阶段,我想知道 Simba 驱动程序现在是否支持它? 如果没有,目前还有其他 jdbc 驱动程序吗?

因此,所有 4 条语句都需要作为单个 Bloc 而不是单独的语句来执行。 在 intellij 中,您可以突出显示所有这些语句并点击 运行 执行它并 return 结果。 在 Java 中,只需将它们作为单个字符串传递到 statement.execute.