dinky icon indicating copy to clipboard operation
dinky copied to clipboard

[Bug] [dlink-connector-phoenix-1.13] 无法获取phoenix 映射的hbase的表

Open hanpi14 opened this issue 4 years ago • 8 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

Flinksql and Phoenix jar are used to obtain the hbase view or table mapped by Phoenix, but an error occurs, and the table data cannot be parsed

本地使用flinksql与 phoenix的jar去获取phoenix 映射hbase的view或者table,但是出现报错,无法解析的到表数据

[ERROR] Could not execute SQL statement. Reason: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Undefined column. columnName=KAFKA_HBASE.NAME

What you expected to happen

Flinksql and Phoenix jar are used to obtain the hbase view or table mapped by Phoenix, but an error occurs, and the table data cannot be parsed

本地使用flinksql与 phoenix的jar去获取phoenix 映射hbase的view或者table,但是出现报错,无法解析的到表数据

[ERROR] Could not execute SQL statement. Reason: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Undefined column. columnName=KAFKA_HBASE.NAME

How to reproduce

Please advise how to modify

Anything else

No response

Version

0.6.5-SNAPSHOT

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

hanpi14 avatar Jun 14 '22 08:06 hanpi14

Can you provide flink ddl ? or check you column

gaogao110 avatar Jun 15 '22 01:06 gaogao110

你能提供 flink ddl 吗? 或检查你的专栏

DROP TABLE IF EXISTS phoenix_source; CREATE TABLE phoenix_source ( id VARCHAR, name VARCHAR, addr VARCHAR, PRIMARY KEY (id) NOT ENFORCED ) WITH ( 'connector.type' = 'phoenix', 'connector.url' = 'jdbc:phoenix:hadoop2:2181', 'connector.table' = 'kafka_hbase',
'connector.driver' = 'org.apache.phoenix.jdbc.PhoenixDriver', 'connector.username' = '', 'connector.password' = '', 'phoenix.schema.isnamespacemappingenabled' = 'true', 'phoenix.schema.mapsystemtablestonamespace' = 'true', 'connector.write.flush.max-rows' = '1' );

Kafka_hbase is a view mapping table of Phoenix mapping hbase 这个kafka_hbase是phoenix映射hbase的视图映射表

hanpi14 avatar Jun 15 '22 02:06 hanpi14

If your Phoenix table does not exist, Flink will not recognize it.

If you use hbase Connector, you will need to query with hbase Connector .

gaogao110 avatar Jun 15 '22 02:06 gaogao110

如果你的 Phoenix 表不存在,Flink 将无法识别它。

如果使用 hbase 连接器,则需要使用 hbase 连接器进行查询。

The Phoenix table exists, but it is only an hbase mapping table. Is the mapping table unavailabl 微信图片_20220615101545 e

hanpi14 avatar Jun 15 '22 02:06 hanpi14

You can try to recreate a table with a schema. Your table has no schema

gaogao110 avatar Jun 15 '22 02:06 gaogao110

您可以尝试使用架构重新创建表。您的表没有架构

Phoenix

Do you mean that I go to hbase to build the schema and create the corresponding table, and Phoenix also builds the corresponding schema and table to verify the mapping table

你的意思是我去hbase中构建schema,创建对应表,而Phoenix中也构建对应schema和表来进行映射表的验证吗

hanpi14 avatar Jun 15 '22 02:06 hanpi14

You can try to recreate a table with a schema. Your table has no schema

I've built the corresponding schema here and it still doesn't wor 微信图片_20220615110652 微信图片_20220615110656 k

hanpi14 avatar Jun 15 '22 03:06 hanpi14

Phoenix is case sensitive ,The columns of your phoneix table should be capitalized

gaogao110 avatar Jul 21 '22 02:07 gaogao110