Skip to content

flinkcdc2.1 oracle 请问这个错误怎么解决 #697

Answered by Tongyaoyu
Tongyaoyu asked this question in Q&A
Discussion options

You must be logged in to vote

自己debug找到了
我的表名是大写PATIENT,在源码中

可以看到tableId 自动把大写表名变成小写
进入isTableSupplementalLogDataAll方法

再进入tableSupplementalLoggingCheckQuery方法

static String tableSupplementalLoggingCheckQuery(TableId tableId) {
        return String.format("SELECT 'KEY', LOG_GROUP_TYPE FROM %s WHERE OWNER = '%s' AND TABLE_NAME = '%s'", "ALL_LOG_GROUPS", tableId.schema(), tableId.table());
    }

他会执行这句sql,但是此时的TABLE_NAME 是小写,于是我在navicat中执行了sql

select * from ALL_LOG_GROUPS


可以看到PATIENT表名为大写,源码中的sql执行出来是查不到的所以出错了
当我把表名改成小写,就可以了
但要是万一表名就是大写该怎么办,有点困惑,有大佬知道的话指点一下

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@Tongyaoyu
Comment options

Answer selected by Tongyaoyu
Comment options

You must be logged in to vote
6 replies
@Tongyaoyu
Comment options

@Tongyaoyu
Comment options

@17554262006
Comment options

@lizhe6132
Comment options

@Karan2007
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants