你指的是Python Table API中如何使用kafka connector的例子吗?这个是有例子的[1]。

关于如何把kafka client的jar包配置到Python环境,分两种情况,当前有对应的两种解决方案:
1)如果是local运行,需要把kafka client的jar拷贝到python环境中pyflink的lib目录下
2)如果是remote运行,可以通过CLI的-j选项添加。

这两种方式对于Python用户来说可能都不太便捷,所以已有一个JIRA[3]在考虑添加另外一种对Python用户来说更友好的方式,欢迎到JIRA里参与讨论。
 
[1] 
https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/connect.html#kafka-connector
 
<https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/connect.html#kafka-connector>
[2] https://ci.apache.org/projects/flink/flink-docs-release-1.10/ops/cli.html 
<https://ci.apache.org/projects/flink/flink-docs-release-1.10/ops/cli.html>
[3] https://issues.apache.org/jira/browse/FLINK-16943 
<https://issues.apache.org/jira/browse/FLINK-16943>
> 在 2020年4月9日,上午8:45,zhisheng <[email protected]> 写道:
> 
> hi, 秦寒
> 
> 暂时还没有 Python 这块的 API,可以去社区 JIRA 提建议
> 
> Best
> 
> zhisheng
> 
> 秦寒 <[email protected]> 于2020年4月8日周三 下午4:10写道:
> 
>> 您好
>> 
>>       Flink的 kafka connector 文档中只有java 和scala的列子,能否添加python
>> 调用kafka的列子,包括如何添加kafka connector,kafka client的jar包配置到pyhon
>> 环境等,谢谢。
>> 
>> 
>> 
>> 

回复