Open 20100507 opened 1 year ago
能提供下你的sql吗?
首先,感谢你的回复; 其次说一下我 使用的版本号: flink1.12.1 和flink1.12.7都测试过了,chunjun 版本为最新release的包。均报错。 还有官方的examples中的样例是错误的 代码中写的uri ,样例给的url。 我的sql如下: ` ``CREATE TABLE device_manage3 ( _id STRING, abc_abc STRING, PRIMARY KEY (_id) NOT ENFORCED ) WITH ( 'connector' = 'mongodb-x', 'uri' = 'mongodb://superadmin:admin@xxxxxx:27017', 'database' = 'alarm', 'collection' = 'device_manage', 'lookup.cache-type' = 'lru' );```
https://github.com/DTStack/chunjun/blob/master/chunjun-examples/sql/mongo/async_join.sql
执行查询:
select * from device_manage3;
I have no problem running through the latest code, this is my sql: CREATE TABLE sk( id int, name varchar, gender int, idcard varchar, proc_time AS PROCTIME() )WITH( 'properties.bootstrap.servers'='localtest:9092', 'connector'='kafka-x', 'scan.parallelism'='1', 'format'='json', 'topic'='trest', 'scan.startup.mode'='latest-offset' ); CREATE TABLE sink( id int, name varchar, gender int, idcard varchar )WITH( 'connector'='print' ); CREATE TABLE side( id int, gender int, PRIMARY KEY(id) NOT ENFORCED )WITH( 'database'='test', 'connector'='mongodb-x', 'lookup.cache-type'='None', 'lookup.parallelism'='1', 'lookup.cache.ttl'='10000', 'lookup.cache.max-rows'='10', 'collection'='mongo_lookup', 'uri'='mongodb://localtest:27017' ); INSERT INTO sink SELECT sk.id, name, sk.gender, sk.idcard FROM sk LEFT JOIN side FOR SYSTEM_TIME AS OF sk.proc_time as s ON sk.gender = s.gender WHERE sk.gender = 0
你的是 mongo 的 sink 表,读取kafka数据写入mongodb,我是读取mongodb数据写入到其他地方。
Search before asking
What happened
What you expected to happen
我希望可以正常查询。select * from mogodb_source_映射表; 可以正常查询。
How to reproduce
只要查询就报错。
Anything else
No response
Version
master
Are you willing to submit PR?
Code of Conduct