Skip to content

Commit

Permalink
[FLINK-25391][format-csv] Forward catalog table options
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper authored and twalthr committed Jan 25, 2022
1 parent 8f77862 commit 0370c36
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/content/docs/connectors/table/formats/csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,25 @@ Format Options
<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: 8%">Forwarded</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>
<th class="text-center" style="width: 42%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><h5>format</h5></td>
<td>required</td>
<td>no</td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>Specify what format to use, here should be <code>'csv'</code>.</td>
</tr>
<tr>
<td><h5>csv.field-delimiter</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;"><code>,</code></td>
<td>String</td>
<td>Field delimiter character (<code>','</code> by default), must be single character. You can use backslash to specify special characters, e.g. <code>'\t'</code> represents the tab character.
Expand All @@ -92,6 +95,7 @@ Format Options
<tr>
<td><h5>csv.disable-quote-character</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;">false</td>
<td>Boolean</td>
<td>Disabled quote character for enclosing field values (false by default).
Expand All @@ -100,13 +104,15 @@ Format Options
<tr>
<td><h5>csv.quote-character</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;"><code>"</code></td>
<td>String</td>
<td>Quote character for enclosing field values (<code>"</code> by default).</td>
</tr>
<tr>
<td><h5>csv.allow-comments</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;">false</td>
<td>Boolean</td>
<td>Ignore comment lines that start with <code>'#'</code> (disabled by default).
Expand All @@ -115,6 +121,7 @@ Format Options
<tr>
<td><h5>csv.ignore-parse-errors</h5></td>
<td>optional</td>
<td>no</td>
<td style="word-wrap: break-word;">false</td>
<td>Boolean</td>
<td>Skip fields and rows with parse errors instead of failing.
Expand All @@ -123,6 +130,7 @@ Format Options
<tr>
<td><h5>csv.array-element-delimiter</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;"><code>;</code></td>
<td>String</td>
<td>Array element delimiter string for separating
Expand All @@ -131,13 +139,15 @@ Format Options
<tr>
<td><h5>csv.escape-character</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>Escape character for escaping values (disabled by default).</td>
</tr>
<tr>
<td><h5>csv.null-literal</h5></td>
<td>optional</td>
<td>yes</td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>Null literal string that is interpreted as a null value (disabled by default).</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ public Set<ConfigOption<?>> optionalOptions() {
return options;
}

@Override
public Set<ConfigOption<?>> forwardOptions() {
Set<ConfigOption<?>> options = new HashSet<>();
options.add(FIELD_DELIMITER);
options.add(DISABLE_QUOTE_CHARACTER);
options.add(QUOTE_CHARACTER);
options.add(ALLOW_COMMENTS);
options.add(ARRAY_ELEMENT_DELIMITER);
options.add(ESCAPE_CHARACTER);
options.add(NULL_LITERAL);
return options;
}

// ------------------------------------------------------------------------
// Validation
// ------------------------------------------------------------------------
Expand Down

0 comments on commit 0370c36

Please sign in to comment.