我正在尝试设置金门以将数据同步到 BigQuery。当我开始推送初始负载时,我的提取器导出了所有数据,甚至从复制统计信息中我能够看到记录已收到,但未推送到 Bigquery。
提取器
GGSCI (bhuvi-oracle) 12> info extract load1
EXTRACT LOAD1 Last Started 2020-05-07 16:52 Status STOPPED
Checkpoint Lag Not Available
Log Read Checkpoint Table HR.TEST
2020-05-07 16:52:41 Record 32768
Task SOURCEISTABLE
复制统计信息
GGSCI (bhuvi-1) 1> stats bq
Sending STATS request to REPLICAT BQ ...
gg.handlerlist=bigquery
Start of Statistics at 2020-05-07 16:53:33.
Replicating from HR.TEST to bhuvi_orcl.test:
*** Total statistics since 2020-05-07 16:52:42 ***
Total inserts 32768.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 32768.00
BigData Golen Gate 上的日志文件:
2020-05-07T16:59:04.895+0000 INFO OGG-00987 Oracle GoldenGate Command Interpreter: GGSCI command (root): start bq.
2020-05-07T16:59:04.904+0000 INFO OGG-00963 Oracle GoldenGate Manager, mgr.prm: Command received from GGSCI on host [10.18.0.61]:42130 (START REPLICAT BQ ).
2020-05-07T16:59:04.905+0000 INFO OGG-00975 Oracle GoldenGate Manager, mgr.prm: REPLICAT BQ starting.
2020-05-07T16:59:04.964+0000 INFO OGG-00995 Oracle GoldenGate Delivery, bq.prm: REPLICAT BQ starting.
2020-05-07T16:59:04.967+0000 INFO OGG-03059 Oracle GoldenGate Delivery, bq.prm: Operating system character set identified as UTF-8.
2020-05-07T16:59:04.967+0000 INFO OGG-02695 Oracle GoldenGate Delivery, bq.prm: ANSI SQL parameter syntax is used for parameter parsing.
2020-05-07T16:59:05.173+0000 INFO OGG-15052 Oracle GoldenGate Delivery, bq.prm: Using Java class path: .:ggjava/ggjava.jar:ggjava/resources/lib/optional/log4j-api-2.9.1.jar:ggjava/resources/lib/optional/log4j-core-2.9.1.jar:ggjava/resources/lib/optional/log4j-slf4j-impl-2.9.1.jar.
2020-05-07T16:59:10.243+0000 INFO OGG-01815 Oracle GoldenGate Delivery, bq.prm: Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/opt/ogg/dirtmp.
2020-05-07T16:59:10.243+0000 INFO OGG-00996 Oracle GoldenGate Delivery, bq.prm: REPLICAT BQ started.
2020-05-07T16:59:10.251+0000 INFO OGG-02243 Oracle GoldenGate Delivery, bq.prm: Opened trail file /opt/ogg/dirdat/oo000000 at 2020-05-07 16:59:10.249063.
2020-05-07T16:59:10.251+0000 INFO OGG-03506 Oracle GoldenGate Delivery, bq.prm: The source database character set, as determined from the trail file, is UTF-8.
2020-05-07T16:59:10.253+0000 INFO OGG-06505 Oracle GoldenGate Delivery, bq.prm: MAP resolved (entry HR.TEST): MAP "HR"."TEST", TARGET bhuvi_orcl.test.
2020-05-07T16:59:10.253+0000 INFO OGG-02756 Oracle GoldenGate Delivery, bq.prm: The definition for table HR.TEST is obtained from the trail file.
2020-05-07T16:59:10.253+0000 INFO OGG-06511 Oracle GoldenGate Delivery, bq.prm: Using following columns in default map by name: ID.
2020-05-07T16:59:10.253+0000 INFO OGG-06510 Oracle GoldenGate Delivery, bq.prm: Using the following key columns for target table bhuvi_orcl.test: ID.
我已经弄清楚这有什么问题,实际上并没有错。这里的故障是映射。
我在 prm 文件中映射了我的表名,如下所示。
MAP HR.TEST, TARGET bqtest.TEST
我在想 bqtest 数据集,我可以看到测试表,但它不是真的。Goldengate 会将您的映射转换为
bqtest_test
. 这是实际的表名。所以你可以看到这个表是自动创建的。