-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Improve documentation for format OPTIONS clause
#15708
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 4 commits
3a7e441
e47787d
c3635db
237023c
197e14f
74b6c73
d582e93
4818dae
03c3b95
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,142 @@ | ||||||||||||||||||||||||
| <!--- | ||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||
| --> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Format Options | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| DataFusion supports customizing how data is read from or written to disk as a result of a `COPY`, `INSERT INTO`, or `CREATE EXTERNAL TABLE` query. There are a few special options, file format (e.g., CSV or Parquet) specific options, and Parquet column-specific options. Options can also in some cases be specified in multiple ways with a set order of precedence. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ## Specifying Options and Order of Precedence | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Format-related options can be specified in the following ways: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| - Session-level config defaults | ||||||||||||||||||||||||
| - `CREATE EXTERNAL TABLE` options | ||||||||||||||||||||||||
| - `COPY` option tuples | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
| Format-related options can be specified in the following ways: | |
| - Session-level config defaults | |
| - `CREATE EXTERNAL TABLE` options | |
| - `COPY` option tuples | |
| Format-related options can be specified in three ways, in decreasing order of precedence: | |
| - `CREATE EXTERNAL TABLE` syntax | |
| - `COPY` option tuples | |
| - Session-level config defaults | |
Outdated
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.
I think this is a CSV specific option (not a generic option)
For example
> create external table my_table(a int) stored as JSON location '/tmp/foo' options('NULL_VALUE' 'NULL');
Invalid or Unsupported Configuration: Config value "null_value" not found on JsonOptions
alamb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
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.
👍 this looks great
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.