[
https://issues.apache.org/jira/browse/FLINK-11965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16796079#comment-16796079
]
Timo Walther commented on FLINK-11965:
--------------------------------------
Supporting a REST API and introducing DDL statements such as {{ create table….,
create view….., create append view….., insert into}} are orthogonal issues. A
REST API needs a proper design document and could take the SQL client
properties in the first version until a DDL is in place on the SQL side.
> Provide a REST API for flink to submit plain SQL flink jobs.
> ------------------------------------------------------------
>
> Key: FLINK-11965
> URL: https://issues.apache.org/jira/browse/FLINK-11965
> Project: Flink
> Issue Type: Improvement
> Components: SQL / Client
> Reporter: chenminghua
> Priority: Major
>
> SQL Client has been able to use Flink with SQL without the need to write Java
> or Scala programs, avoiding tedious compilation and packaging work.However,
> SQL Client is used in Command-Line Interface (CLI), which is not convenient
> for remote application access. In addition, SQL Client must define
> sourceTable and sinkTable in yaml file and submit a job to flink cluster for
> each SQL statement processed.For a slightly more complex stream program is
> not easy to achieve through SQL Client.Therefore, it is necessary to provide
> a REST API for flink to submit plain SQL flink jobs.
> The SQL jobs REST API
> include:/job/submit、/job/list、/job/stop、/job/restart。Where "/job/submit" is
> used to submit the SQL job, and its parameters are passed through the JSON
> request.The JSON request looks like this: {color:#FF0000}{"name":"myJob",
> "statements":"CREATE TABLE userTable (user BIGINT, message VARCHAR) WITH(type
> source, update-mode append, connector.type kafka, connector.version 0.10,
> connector.topic test-user, connector.startup-mode earliest-offset,
> connector.properties.0.key zookeeper.connect, connector.properties.0.value
> zkHost:2181/kafka_2_1_0, connector.properties.1.key bootstrap.servers,
> connector.properties.1.value kafkaHost:9099, format.type json,
> format.fail-on-missing-field true, format.derive-schema true); CREATE TABLE
> targetUserTable (user BIGINT, message VARCHAR) WITH(type sink, ……); CREATE
> APPEND VIEW appView SELECT user, message FROM userTable group by user,
> message; INSERT into targetUserTable SELECT user, message FROM
> appView;”}{color}.name is the name of the job. statements is the contents of
> a job, which contains multiple SQL statements(Support create table…., create
> view….., create append view….., insert into….. several types of SQL
> statements).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)