-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-35159][SQL][DOCS] Extract hive format doc #32264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
df246ea
5d53976
a49f1e5
d98f825
203f544
5fe64b5
be29ae8
9bfa1cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| layout: global | ||
| title: Data Retrieval | ||
|
AngersZhuuuu marked this conversation as resolved.
Outdated
|
||
| displayTitle: Data Retrieval | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh, got it. I saw @cloud-fan 's comment,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, refer this in other menu doc is so strange and it's refer in two syntax doc with different type. |
||
| license: | | ||
| 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. | ||
| -- | ||
|
|
||
| ### Description | ||
|
|
||
| Spark supports Hive format in `CREATE TABLE` clause and `TRANSFORM` clause, | ||
|
AngersZhuuuu marked this conversation as resolved.
Outdated
|
||
| to specify serde or text delimeter. In `row_format`, uses the `SERDE` clause to specify a custom SerDe | ||
|
AngersZhuuuu marked this conversation as resolved.
Outdated
|
||
| for one table or processing inputs and outputs data. Otherwise, use the `DELIMITED` clause | ||
| to use the native SerDe and specify the delimiter, escape character, null character and so on. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Year, more clear |
||
|
|
||
| ### Syntax | ||
|
|
||
| ```sql | ||
| row_format: | ||
| SERDE serde_class [ WITH SERDEPROPERTIES (k1=v1, k2=v2, ... ) ] | ||
| | DELIMITED [ FIELDS TERMINATED BY fields_terminated_char [ ESCAPED BY escaped_char ] ] | ||
| [ COLLECTION ITEMS TERMINATED BY collection_items_terminated_char ] | ||
| [ MAP KEYS TERMINATED BY map_key_terminated_char ] | ||
| [ LINES TERMINATED BY row_terminated_char ] | ||
| [ NULL DEFINED AS null_char ] | ||
| ``` | ||
|
|
||
| ### Parameters | ||
|
|
||
| * **SERDE serde_class** | ||
|
|
||
| Specifies a fully-qualified class name of custom SerDe for one table or processing inputs and outputs data. | ||
|
AngersZhuuuu marked this conversation as resolved.
Outdated
|
||
|
|
||
| * **SERDEPROPERTIES** | ||
|
|
||
| A list of key-value pairs that is used to tag the SerDe definition. | ||
|
|
||
| * **DELIMITED** | ||
|
AngersZhuuuu marked this conversation as resolved.
Outdated
|
||
|
|
||
| The `DELIMITED` clause can be used to specify the native SerDe and state the delimiter, escape character, null character and so on. | ||
|
|
||
| * **FIELDS TERMINATED BY** | ||
|
|
||
| Used to define a column separator. | ||
|
|
||
| * **COLLECTION ITEMS TERMINATED BY** | ||
|
|
||
| Used to define a collection item separator. | ||
|
|
||
| * **MAP KEYS TERMINATED BY** | ||
|
|
||
| Used to define a map key separator. | ||
|
|
||
| * **LINES TERMINATED BY** | ||
|
|
||
| Used to define a row separator. | ||
|
|
||
| * **NULL DEFINED AS** | ||
|
|
||
| Used to define the specific value for NULL. | ||
|
|
||
| * **ESCAPED BY** | ||
|
|
||
| Used for escape mechanism. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
Specifies the row format for input and output. See [HIVE ROW FORMAT](...) for more syntax details.?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done