-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
mongodb not find column? #22465
Comments
The connector guesses the schema definition based on a sample document during the first access. You need to fix the definition with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in mongodb, I INSERT some data like this:the first redord password and arrayF1 is null
develop:PRIMARY> db.c1.insertMany([
... {
... "userid": 2,
... "username": "anotherUser",
... "phone": "anotherPhone",
... "email": "anotherEmail",
... "password": {},
... "arrayF1": []
... },
... {
... "userid": 3,
... "username": "yetAnotherUser",
... "phone": "yetAnotherPhone",
... "email": "yetAnotherEmail",
... "password": "yetAnotherPassword",
... "arrayF1": ["yetAnotherValue1"]
... },
... {
... "userid": 4,
... "username": "newAnotherUser",
... "phone": "newAnotherPhone",
... "email": "newAnotherEmail",
... "password": "newAnotherPassword",
... "arrayF1": ["anotherValue1", "anotherValue2"]
... },
... {
... "userid": 5,
... "username": "1newAnotherUser",
... "phone": "1newAnotherPhone",
... "email": "1newAnotherEmail",
... "password": "1newAnotherPassword",
... "arrayF1": ["1newAnother"]
... }
... ]);
now in trino-client
trino:hellodb> show create table c1;
Create Table
CREATE TABLE mongodb.hellodb.c1 (
userid double,
username varchar,
phone varchar,
email varchar
)
(1 row)
trino:hellodb> select * from c1;
userid | username | phone | email
--------+-----------------+------------------+------------------
2.0 | anotherUser | anotherPhone | anotherEmail
5.0 | 1newAnotherUser | 1newAnotherPhone | 1newAnotherEmail
4.0 | newAnotherUser | newAnotherPhone | newAnotherEmail
3.0 | yetAnotherUser | yetAnotherPhone | yetAnotherEmail
(4 rows)
why not find "password" and "arrayF1" column,how can reslove it?
Due to geographical reasons, I am unable to join the at community Slack。please help me
The text was updated successfully, but these errors were encountered: