简体   繁体   English

如何从 NodeJS 连接到 Flink SQL Client?

[英]How to connect to Flink SQL Client from NodeJS?

I'm trying to use Apache Flink's Table concept in one of my projects to combine data from multiple sources in real-time.我正在尝试在我的一个项目中使用 Apache Flink 的 Table 概念来实时组合来自多个来源的数据。 Unfortunately, all of my team members are Node.JS developers.不幸的是,我的所有团队成员都是 Node.JS 开发人员。 So, I'm looking for possible ways to connect to Flink from NodeJS and query from it.因此,我正在寻找从 NodeJS 连接到 Flink 并从中查询的可能方法。 In Flink's documentation for SQL Client, it's mentioned thatFlink 的 SQL Client 文档中,提到了

The SQL Client aims to provide an easy way of writing, debugging, and submitting table programs to a Flink cluster without a single line of Java or Scala code. SQL Client 旨在提供一种简单的方式来编写、调试和提交表程序到 Flink 集群,而无需一行 Java 或 Scala 代码。 The SQL Client CLI allows for retrieving and visualizing real-time results from the running distributed application on the command line. SQL 客户端 CLI 允许在命令行上从正在运行的分布式应用程序检索和可视化实时结果。

Based on this, is there any way to connect to Flink's SQL client from NodeJS?基于此,有没有办法从 NodeJS 连接到 Flink 的 SQL 客户端? Is there any driver already available for this like Node.JS drivers for MySQL or MSSQL .是否有任何可用的驱动程序,例如MySQLMSSQL的 Node.JS 驱动程序。 Otherwise, what are the possible ways of achieving this?否则,实现这一目标的可能方法是什么?

Any idea or clarity on achieving this would be greatly helpful and much appreciated.任何关于实现这一目标的想法或清晰度都将非常有帮助并非常感激。

There's currently not much that you can do.目前你能做的并不多。 The SQL Client runs on local machines and connects to the cluster there. SQL 客户端在本地机器上运行并连接到那里的集群。 I think what will help you is the introduction of the Flink SQL Gateway, which is expected to be released with Flink 1.16.我认为对你有帮助的是 Flink SQL Gateway 的介绍,它预计将与 Flink 1.16 一起发布。 You can read more about that on https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway您可以在https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway上阅读更多相关信息

Another alternative is to check out some of the products that offer a FlinkSQL editor on the market, maybe that is useful path for your colleagues.另一种选择是查看市场上提供 FlinkSQL 编辑器的一些产品,这可能对您的同事有用。

For example:例如:

https://www.ververica.com/apache-flink-sql-on-ververica-platform https://docs.cloudera.com/csa/1.7.0/ssb-overview/topics/csa-ssb-intro.html https://www.ververica.com/apache-flink-sql-on-ververica-platform https://docs.cloudera.com/csa/1.7.0/ssb-overview/topics/csa-ssb-intro.html

Note that this is not exactly what you asked for, but could be an option to enable your team.请注意,这并不完全符合您的要求,但可能是启用您的团队的一个选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM