是否可以使用Apache-Zeppelin的Notebook REST-API来执行SQL查询并检索结果?

时间:2022-06-18 14:50:54

I've been exploring a bit of Apache Zeppelin and I found the Notebook REST-API.

我一直在探索Apache Zeppelin,我发现了Notebook REST-API。

After exploring the documentation, I couldn't understand if it is possible to send a SQL query via Notebook API, execute it in Apache Zeppelin, and retrieve its results via the same channel.

在浏览文档之后,我无法理解是否可以通过Notebook API发送SQL查询,在Apache Zeppelin中执行它,并通过相同的通道检索其结果。

To do so, I'd be using a Spring Boot server to send the queries to the Apache Zeppelin server and to receive the query results returned.

为此,我将使用Spring Boot服务器将查询发送到Apache Zeppelin服务器并接收返回的查询结果。

Is it possible to use Zeppelin to achieve this goal?

是否可以使用Zeppelin来实现这一目标?

1 个解决方案

#1


2  

In Zeppelin, the unit of execution is a paragraph and a note contains multiple paragraphs. Thus to run a query,

在Zeppelin中,执行单元是段落,注释包含多个段落。因此,要运行查询,

  1. create a note
  2. 创建一个笔记

  3. create a paragraph
  4. 创建一个段落

  5. execute the paragraph asynchronously (there is a synchronous version as well, but need to consider large query)
  6. 异步执行段落(也有同步版本,但需要考虑大查询)

Currently, there is no API for updating paragraph text. (https://issues.apache.org/jira/browse/ZEPPELIN-1897) So we need to create new paragraph every time.

目前,没有用于更新段落文本的API。 (https://issues.apache.org/jira/browse/ZEPPELIN-1897)所以我们每次都需要创建新的段落。

#1


2  

In Zeppelin, the unit of execution is a paragraph and a note contains multiple paragraphs. Thus to run a query,

在Zeppelin中,执行单元是段落,注释包含多个段落。因此,要运行查询,

  1. create a note
  2. 创建一个笔记

  3. create a paragraph
  4. 创建一个段落

  5. execute the paragraph asynchronously (there is a synchronous version as well, but need to consider large query)
  6. 异步执行段落(也有同步版本,但需要考虑大查询)

Currently, there is no API for updating paragraph text. (https://issues.apache.org/jira/browse/ZEPPELIN-1897) So we need to create new paragraph every time.

目前,没有用于更新段落文本的API。 (https://issues.apache.org/jira/browse/ZEPPELIN-1897)所以我们每次都需要创建新的段落。