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

Creating an external table in the format of ndjson is invalid #1957

Open
IvanGao01 opened this issue Jan 24, 2024 · 0 comments
Open

Creating an external table in the format of ndjson is invalid #1957

IvanGao01 opened this issue Jan 24, 2024 · 0 comments
Assignees
Labels
type/bug Something isn't working

Comments

@IvanGao01
Copy link
Member

Describe the bug

Creating an external table in the format of 'ndjson' is invalid,
no data found

To Reproduce

  1. Create a ndjson format data file
echo -e '{"name": "John", "age": 30, "city": "New York"}\n{"name": "Alice", "age": 25, "city": "Los Angeles"}\n{"name": "Bob", "age": 35, "city": "Chicago"}' > basic.ndjson
  1. Create an external table using the 'cnosdb cli' command line
CREATE EXTERNAL TABLE basic (
     name  STRING NOT NULL,
     age     INT NOT NULL,
     city    STRING NOT NULL,
)
STORED AS NDJSON
WITH HEADER ROW
LOCATION '/basic.ndjson';
  1. 查询
select * from basic

No data returned

Expected behavior

+-------+-----+-------------+
| name  | age | city        |
+-------+-------------------+
| John  | 30  | New York    |
| Alice | 25  | Los Angeles |
| Bob   | 35  | Chicago     |

Additional context

Version: cnosdb 2.3.4, revision 6765f19

@IvanGao01 IvanGao01 added the type/bug Something isn't working label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants