lirui-apache commented on a change in pull request #12602: URL: https://github.com/apache/flink/pull/12602#discussion_r439287738
########## File path: docs/dev/table/connectors/formats/orc.md ########## @@ -0,0 +1,183 @@ +--- +title: "Orc Format" +nav-title: Orc +nav-parent_id: sql-formats +nav-pos: 6 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<span class="label label-info">Format: Serialization Schema</span> +<span class="label label-info">Format: Deserialization Schema</span> + +* This will be replaced by the TOC +{:toc} + +The [Apache Orc](https://orc.apache.org/) format allows to read and write Orc data. + +Dependencies +------------ + +In order to setup the Orc format, the following table provides dependency information for both +projects using a build automation tool (such as Maven or SBT) and SQL Client with SQL JAR bundles. + +| Maven dependency | SQL Client JAR | +| :----------------- | :----------------------| +| `flink-orc` |{% if site.is_stable %} [Download](https://repo.maven.apache.org/maven2/org/apache/flink/flink-orc{{site.scala_version_suffix}}/{{site.version}}/flink-orc{{site.scala_version_suffix}}-{{site.version}}-jar-with-dependencies.jar) {% else %} Only available for stable releases {% endif %}| Review comment: I think it's better to provide the full coordinates of the maven artifact, e.g. `org.apache.flink:flink-orc...`. Or maybe something like ``` <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-orc_{{site.scala_version_suffix}}</artifactId> <version>{{site.version}}</version> </dependency> ``` Then users can simply copy it to their pom files. ########## File path: docs/dev/table/connectors/formats/orc.md ########## @@ -0,0 +1,183 @@ +--- +title: "Orc Format" +nav-title: Orc +nav-parent_id: sql-formats +nav-pos: 6 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<span class="label label-info">Format: Serialization Schema</span> +<span class="label label-info">Format: Deserialization Schema</span> + +* This will be replaced by the TOC +{:toc} + +The [Apache Orc](https://orc.apache.org/) format allows to read and write Orc data. + +Dependencies +------------ + +In order to setup the Orc format, the following table provides dependency information for both +projects using a build automation tool (such as Maven or SBT) and SQL Client with SQL JAR bundles. + +| Maven dependency | SQL Client JAR | +| :----------------- | :----------------------| +| `flink-orc` |{% if site.is_stable %} [Download](https://repo.maven.apache.org/maven2/org/apache/flink/flink-orc{{site.scala_version_suffix}}/{{site.version}}/flink-orc{{site.scala_version_suffix}}-{{site.version}}-jar-with-dependencies.jar) {% else %} Only available for stable releases {% endif %}| + +How to create a table with Orc format +---------------- + +Here is an example to create a table using Filesystem connector and Orc format. + +<div class="codetabs" markdown="1"> +<div data-lang="SQL" markdown="1"> +{% highlight sql %} +CREATE TABLE user_behavior ( + user_id BIGINT, + item_id BIGINT, + category_id BIGINT, + behavior STRING, + ts TIMESTAMP(3), + dt STRING +) PARTITIONED BY (dt) WITH ( + 'connector' = 'filesystem', + 'path' = '/tmp/user_behavior', + 'format' = 'orc' +) +{% endhighlight %} +</div> +</div> + +Format Options +---------------- + +<table class="table table-bordered"> + <thead> + <tr> + <th class="text-left" style="width: 25%">Option</th> + <th class="text-center" style="width: 8%">Required</th> + <th class="text-center" style="width: 7%">Default</th> + <th class="text-center" style="width: 10%">Type</th> + <th class="text-center" style="width: 50%">Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><h5>format</h5></td> + <td>required</td> + <td style="word-wrap: break-word;">(none)</td> + <td>String</td> + <td>Specify what format to use, here should be 'orc'.</td> + </tr> + </tbody> +</table> + +Orc format also supports table properties from [Table properties](https://orc.apache.org/docs/hive-config.html#table-properties). +For example, you can configure `orc.compress=SNAPPY` to enable snappy compression. Review comment: Shall we list all the supported properties? Or maybe we can add link to Orc doc if all the properties are supported. ---------------------------------------------------------------- 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]
