首页 > 解决方案 > 如何为 Oracle Goldengate BigQuery 适配器设置 gg.classpath

问题描述

我正在尝试为 Oracle 金门 (12c) 配置 BigQuery 适配器。但不幸的是,我无法理解这一点gg.classpath。在文档中,他们提到从GitHub下载客户端 Lib

但是它包含这么多文件夹,我不知道我可以下载哪个文件夹以及将它们复制到哪里。

我们还下载了一些 JAR 文件,并将其放在一个目录中。

Next, download the following JARs from Maven Central, and then include them in the classpath for the BigQuery Handler:

我可以把这些 JAR 文件放在哪里?

有人可以给我一个配置的例子吗gg.classpath

Oracle 文档链接https ://docs.oracle.com/en/middleware/goldengate/big-data/12.3.2.1/gadbd/using-bigquery-handler.html#GUID-A8426075-81E8-47AB-BA15-3C564751A490

例如 gg.classpathgg.classpath= /path_to_repository/bigquery/libs/*:/path_to_repository/bigquery/*

标签: javaoraclegoogle-bigqueryoracle-golden-gate

解决方案


只需将答案留在这里,以便其他人可以从中受益。

-- Steps for manually build the jar files
-- Or download all the jar from the above link and skip all these steps.

apt install maven
git clone https://github.com/googleapis/google-api-java-client-services.git
cd google-api-java-client-services/clients/google-api-services-bigquery/v2/1.29.2/
mvn clean install

-- Copy all the jar files to /opt/ogg/jar
mkdir -p /opt/ogg/jar
cp target/*.jar /opt/ogg/jar

-- We also need to download the following JARs from Maven Central
-- download path /opt/ogg/jar

api-common-1.6.0.jar
gax-1.28.0.jar
gax-httpjson-0.45.0.jar
google-auth-library-credentials-0.9.1.jar
google-auth-library-oauth2-http-0.9.1.jar
google-cloud-bigquery-1.31.0.jar
google-cloud-core-1.35.0.jar
google-cloud-core-http-1.35.0.jar
google-http-client-jackson-1.23.0.jar
guava-25.1-jre.jar
threetenbp-1.3.6.jar

或者我有一个包含所有必要文件的 zip 文件。您可以从以下链接获取它。 https://github.com/BhuviTheDataGuy/medium-blog-files/raw/master/golden-gate-bigquery/jar-files.zip

有关从 Oracle 到 BigQuery 的更详细的逐步设置,请参阅以下链接。 https://medium.com/searce/sync-oracle-to-bigquery-with-golden-gate-bigquery-adapter-59991bbdb5e3


推荐阅读