I am seeing the error above error.Can someone please help what went wrong.
Hi,
Are there any additional error lines?
CREATE EXTERNAL TABLE individuals
You’re defining first_name field to be INT, shouldn’t name values be string similar to last_name ?
WITH SERDEPROPERTIES(‘mongo.columns.mapping’=’{“first_name”:”fname”,”last_name”:”lname”}’)
If the fields in the MongoDB collection are first_name and last_name then you would want to map them the same as well.
Try:
WITH SERDEPROPERTIES('mongo.columns.mapping'='{"first_name":"first_name","last_name":"last_name"}')
See also BSONSerDe Mappings
Regards,
Wan.