Skip to content
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

Misc. IMPORT updates #6244

Merged
merged 1 commit into from
Jan 2, 2020
Merged

Misc. IMPORT updates #6244

merged 1 commit into from
Jan 2, 2020

Conversation

lnhsingh
Copy link
Contributor

@lnhsingh lnhsingh commented Dec 26, 2019

Edits:

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@lnhsingh lnhsingh changed the title IMPORT updates Misc. IMPORT updates Dec 26, 2019
@lnhsingh lnhsingh requested a review from dt December 26, 2019 22:44
@lnhsingh
Copy link
Contributor Author

@dt - can you please review these misc. IMPORT updates? If you think someone else should review, lmk. Thanks!

@lnhsingh lnhsingh marked this pull request as ready for review December 26, 2019 22:46
Copy link
Member

@dt dt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks, though @spaskob might be more qualified to confirm for the DELIMITED and strict quotes stuff

Copy link

@spaskob spaskob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @Amruta-Ranade and @lnhsingh)


v19.2/import.md, line 735 at r3 (raw file):

'

I'd use something more suggestive for escaping: ''
also elsewhere


v19.2/import.md, line 761 at r3 (raw file):

If you want to escape the character used as the delimiter, use `fields_escaped_by`.
{{site.data.alerts.end}}

If you want to escape special symbols, use fields_escaped_by.


v20.1/import.md, line 749 at r3 (raw file):

{{site.data.alerts.callout_info}}
If you want to escape the character used as the delimiter, use `fields_escaped_by`.

If you want to escape the character used as the delimiter, use fields_escaped_by.

Copy link
Contributor Author

@lnhsingh lnhsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @Amruta-Ranade and @spaskob)


v19.2/import.md, line 735 at r3 (raw file):

Previously, spaskob (Spas Bojanov) wrote…
'

I'd use something more suggestive for escaping: ''
also elsewhere

Done


v19.2/import.md, line 761 at r3 (raw file):

Previously, spaskob (Spas Bojanov) wrote…
If you want to escape the character used as the delimiter, use `fields_escaped_by`.
{{site.data.alerts.end}}

If you want to escape special symbols, use fields_escaped_by.

Done.


v20.1/import.md, line 749 at r3 (raw file):

Previously, spaskob (Spas Bojanov) wrote…

If you want to escape the character used as the delimiter, use fields_escaped_by.

Done.

v19.2/import.md Outdated

<a name="delimiter"></a>

Key | Context&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Value |
--------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`delimiter` | `CSV DATA ` | The unicode character that delimits columns in your rows. **Default: `,`**.
`comment` | `CSV DATA ` | The unicode character that identifies rows to skip.
`strict_quotes` | `CSV DATA` | Use if CSV import files have quotes (`""`) within rows to prevent multiple rows from being treated as single rows. **Off by default**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Change "Off by default" to "Default: Off" to maintain consistency.

v20.1/import.md Outdated

<a name="delimiter"></a>

Key | Context&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Value |
--------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`delimiter` | `CSV DATA ` | The unicode character that delimits columns in your rows. **Default: `,`**.
`comment` | `CSV DATA ` | The unicode character that identifies rows to skip.
`strict_quotes` | `CSV DATA` | Use if CSV import files have quotes (`""`) within rows to prevent multiple rows from being treated as single rows. **Off by default**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Change "Off by default" to "Default: Off" to maintain consistency.

v20.1/import.md Outdated
@@ -78,14 +78,15 @@ URLs for the files you want to import must use the format shown below. For exam

### Import options

You can control the `IMPORT` process's behavior using any of the following optional key-value pairs as a `kv_option`.
You can control the `IMPORT` process's behavior using any of the following optional key-value pairs as a `kv_option`. To set multiple import options, use a comma separated list ([see examples](#import-a-delimited-data-file)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comma separated > comma-separated

v19.2/import.md Outdated
@@ -78,14 +78,15 @@ URLs for the files you want to import must use the format shown below. For exam

### Import options

You can control the `IMPORT` process's behavior using any of the following optional key-value pairs as a `kv_option`.
You can control the `IMPORT` process's behavior using any of the following optional key-value pairs as a `kv_option`. To set multiple import options, use a comma separated list ([see examples](#import-a-delimited-data-file)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comma separated > comma-separated

Copy link
Contributor Author

@lnhsingh lnhsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTRs!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @lnhsingh and @spaskob)


v19.2/import.md, line 81 at r4 (raw file):

Previously, Amruta-Ranade (Amruta Ranade) wrote…

nit: comma separated > comma-separated

Done.


v19.2/import.md, line 89 at r4 (raw file):

Previously, Amruta-Ranade (Amruta Ranade) wrote…

nit: Change "Off by default" to "Default: Off" to maintain consistency.

Done.

Add example of DELIMITED with escaping. Closes #5895.

Add note about DEFAULT values and using multiple options.

Closes #5494. Closes #5929.

Add strict_quotes option. Closes #5851

Edits based on feedback

Edits based on feedback
@lnhsingh lnhsingh merged commit 1c9918e into master Jan 2, 2020
@lnhsingh lnhsingh deleted the import branch January 2, 2020 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants