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

LineAsString format. #13630

Closed
alexey-milovidov opened this issue Aug 12, 2020 · 3 comments · Fixed by #13846 or #14703
Closed

LineAsString format. #13630

alexey-milovidov opened this issue Aug 12, 2020 · 3 comments · Fixed by #13846 or #14703
Labels
easy task Good for first contributors feature

Comments

@alexey-milovidov
Copy link
Member

Treat every line of input as a single String field.
Similar to JSONAsString.

@alexey-milovidov alexey-milovidov added feature easy task Good for first contributors labels Aug 12, 2020
@hexiaoting
Copy link
Contributor

hexiaoting commented Aug 14, 2020

Hi! I've finished this feature. It currently works as following:

DROP TABLE IF EXISTS line_as_string;
CREATE TABLE line_as_string (field String) ENGINE = Memory;
INSERT INTO line_as_string FORMAT LineAsString "I love apple", "I love banana", "I love orange";

select * from line_as_string shows:
┌─field────────────┐
│ I love apple     │
│ I love banana    │
│ I love orange    │
└──────────────────┘

Does this accomplish the need?

@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Aug 14, 2020

@hexiaoting It should output:

┌─field────────────────────────────────────────────┐
│ "I love apple", "I love banana", "I love orange" │
└──────────────────────────────────────────────────┘

So, it interprets every line of input data as single value.

@hexiaoting
Copy link
Contributor

Add new feature: Format LineAsString #13846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy task Good for first contributors feature
Projects
None yet
2 participants