danny0405 commented on a change in pull request #9366: [FLINK-13359][docs] Add
documentation for DDL introduction
URL: https://github.com/apache/flink/pull/9366#discussion_r314664862
##########
File path: docs/dev/table/connect.md
##########
@@ -900,6 +1026,78 @@ connector:
connection-path-prefix: "/v1" # optional: prefix string to be added to
every REST communication
{% endhighlight %}
</div>
+
+<div data-lang="DDL" markdown="1">
+{% highlight sql %}
+-- CREATE a version 6 Elasticsearch table.
+create table MyUserTable (
+ user bigint,
+ message string,
+ ts string
+) with (
+ 'connector.type' = 'elasticsearch', -- required: specify this table type is
elasticsearch
+
+ 'connector.version' = '6', -- required: valid connector versions
are "6"
+
+ 'format.type' = 'json', -- required: specify which format to
deserialize(as table source)
+
+ 'connector.hosts.0.hostname' = 'host_name', -- required: one or more
Elasticsearch hosts to connect to
+ 'connector.hosts.0.port' = '9092',
+ 'connector.hosts.0.protocol' = 'http',
+
+ 'connector.index' = 'MyUsers', -- required: Elasticsearch index
+
+ 'connector.document-type' = 'user', -- required: Elasticsearch document type
+
+ 'update-mode' = 'append', -- optional: update mode when used as
table sink,
+ -- only support append mode now.
+
+ 'format.derive-schema' = 'true', -- optional: derive the
serialize/deserialize format
+ -- schema from the table schema.
+
+ 'format.json-schema' = '...', -- optional: specify the
serialize/deserialize format schema,
Review comment:
Why ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services