目录
百战程序员,全站22050+开发课程+文档 ,学习精选优质好课快人一步!观看视频 快捷键ALT+N

大数据全系列 教程

1869个小节阅读:467.2k

收藏
全部开发者教程

408考研

JAVA全系列 教程

面向对象的程序设计语言

Python全系列 教程

Python3.x版本,未来主流的版本

人工智能 教程

顺势而为,AI创新未来

大厂算法 教程

算法,程序员自我提升必经之路

C++ 教程

一门通用计算机编程语言

微服务 教程

目前业界流行的框架组合

web前端全系列 教程

通向WEB技术世界的钥匙

大数据全系列 教程

站在云端操控万千数据

AIGC全能工具班

A

A A

White Night

阅读(200)
赞(0)

集成Hive

SQLClient

SQL Client提供一种简单的方式来编写、调试和提交表程序(DDL、DQL、DML语句)到Flink 集群上,而无需写一行Scala 代码;能够在命令行中检索和可视化分布式应用中实时产生的结果。

SQL Client内嵌在常规 Flink 发行版中,因此可以直接运行,仅需要一个正在运行的 Flink 集群就可以在其中执行表程序。

  • 启动Flink集群
  • 启动SQL Client
  • 查看命令帮助

Flink SQL> HELP; The following commands are available:

HELP Prints the available commands. QUIT/EXIT Quits the SQL CLI client. CLEAR Clears the current terminal. SET Sets a session configuration property. Syntax: "SET ''='';". Use "SET;" for listing all properties. RESET Resets a session configuration property. Syntax: "RESET '';". Use "RESET;" for reset all session properties. INSERT INTO Inserts the results of a SQL SELECT query into a declared table sink. INSERT OVERWRITE Inserts the results of a SQL SELECT query into a declared table sink and overwrite existing data. SELECT Executes a SQL SELECT query on the Flink cluster. EXPLAIN Describes the execution plan of a query or table with the given name. ......

  • 执行SQL语句

可视化的三种模式,通过命令:SET sql-client.execution.result-mode=xxx进行切换:

  1. table:表格模式,也是默认模式

  2. tableau:数据库表格模式

  3. changelog:变更日志模式

案例:使用SQLClient完成指定单词的词频统计

 

北京市昌平区回龙观镇南店村综合商业楼2楼226室

©2014-2023 百战卓越(北京)科技有限公司 All Rights Reserved.

京ICP备14032124号-2