无法使用m子连接到Google Bigquery

发布于 2025-02-07 19:29:30 字数 2484 浏览 2 评论 0原文

我正在尝试连接到BigQuery迁移数据,目前我面临着一些有关问题的问题。

我当前重点关注

  1. 数据库连接器的2种方法,并通过JDBC连接字符串
<db:config name="Database_Config" doc:name="Database Config" doc:id="07671c43-86bc-4768-b914-c71058120615" >
    <db:generic-connection url="jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<project-id>;OAuthType=0;OAuthPvtKeyPath=<path-to-key-file>;OAuthServiceAcctEmail=<email>" driverClassName="com.simba.googlebigquery.jdbc42.Driver"/>
</db:config>

测试连接时会导致错误

ToolingException{message='Got status code: 500 when trying to
 resolve a Mule Runtime operation. Reason: 'Server Error.
 {"errorType":null,"errorMessage":null,"errorDetail":null,"additionalProperties":{servlet=org.glassfish.jersey.servlet.ServletContainer-7bf5036,
 message=Request failed.,
 url=/mule/tooling/applications/4cfe61fc-a304-4ee5-8b52-36ed6e4cfd66/components/Database_Config/connection,
 status=500}}''   , rootCauseMessage='null'   , rootCauseType='null'  
 , rootCauseStackTrace='[]'}    at
 org.mule.tooling.client.api.exception.ToolingException$Builder.build(ToolingException.java:141)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.handleToolingAgentHandlerException(RestAgentToolingService.java:911)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.lambda$serviceExceptionOrToolingException$43(RestAgentToolingService.java:859)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.serviceExceptionOr(RestAgentToolingService.java:873)
  1. bigquery Connector MuleSoft提供的
    <bigquery:config name="BigQuery__Configuration" doc:name="BigQuery  Configuration" doc:id="3b8287ed-f3e5-4721-bd9e-96950347cf3a" >
        <bigquery:jwt-connection privateKeyId="<private-key-id>" privateKey="<private-key>" issuer="<email>" projectId="<project-id>" />
    </bigquery:config>

上述结果导致错误

 org.mule.runtime.api.connection.ConnectionException: Could not
 create connection   Caused by:
 org.mule.runtime.api.exception.MuleRuntimeException: Invalid PKCS8
 data.

i i确保通过的凭据适当,我们还与客户核对有关使用此问题的适当特权,但仍未找到解决此问题的方法。

参考

mulesoft-bigquery-jdbc

I am trying to connect to BigQuery for migrating data and I am currently facing some issues in connection.

2 approaches which I am currently focusing on

  1. Database Connector with passing JDBC connection string
<db:config name="Database_Config" doc:name="Database Config" doc:id="07671c43-86bc-4768-b914-c71058120615" >
    <db:generic-connection url="jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<project-id>;OAuthType=0;OAuthPvtKeyPath=<path-to-key-file>;OAuthServiceAcctEmail=<email>" driverClassName="com.simba.googlebigquery.jdbc42.Driver"/>
</db:config>

The above results in an error when testing connection

ToolingException{message='Got status code: 500 when trying to
 resolve a Mule Runtime operation. Reason: 'Server Error.
 {"errorType":null,"errorMessage":null,"errorDetail":null,"additionalProperties":{servlet=org.glassfish.jersey.servlet.ServletContainer-7bf5036,
 message=Request failed.,
 url=/mule/tooling/applications/4cfe61fc-a304-4ee5-8b52-36ed6e4cfd66/components/Database_Config/connection,
 status=500}}''   , rootCauseMessage='null'   , rootCauseType='null'  
 , rootCauseStackTrace='[]'}    at
 org.mule.tooling.client.api.exception.ToolingException$Builder.build(ToolingException.java:141)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.handleToolingAgentHandlerException(RestAgentToolingService.java:911)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.lambda$serviceExceptionOrToolingException$43(RestAgentToolingService.java:859)
    at
 org.mule.tooling.agent.rest.client.RestAgentToolingService.serviceExceptionOr(RestAgentToolingService.java:873)
  1. BigQuery Connector provided by MuleSoft
    <bigquery:config name="BigQuery__Configuration" doc:name="BigQuery  Configuration" doc:id="3b8287ed-f3e5-4721-bd9e-96950347cf3a" >
        <bigquery:jwt-connection privateKeyId="<private-key-id>" privateKey="<private-key>" issuer="<email>" projectId="<project-id>" />
    </bigquery:config>

The above results in an error

 org.mule.runtime.api.connection.ConnectionException: Could not
 create connection   Caused by:
 org.mule.runtime.api.exception.MuleRuntimeException: Invalid PKCS8
 data.

I made sure the credentials passed are appropriate and we also checked with the customer regarding appropriate privileges to use this but still did not find a way to solve this.

References

mulesoft-bigquery-jdbc

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文