Reputation: 1
As i am new in apache drill and mongodb need someone's help
I have to fetch data after joining two tables Table1 courierrecords Table2 customers
query:-
select courierrecords.shipmentReferenceNumber1, customers.name
from courierrecords
join customers on courierrecords.customer_id=customers.customerId;
getting below error enter image description here
Any help here. also any ideas how to join with ObjectId's
I have tried many examples which I find on internet as well as in Apache documentation but still getting errors
Upvotes: 0
Views: 168
Reputation: 1389
You can refer to MongoDB ObjectIDs from Drill SQL using the column name _id
, e.g.
select courierrecords.shipmentReferenceNumber1, customers.name
from courierrecords join customers on courierrecords._id = customers._id;
Please also see DRILL-8190 which describes a recently fixed bug relating to MongoDB collection joins. Drill 1.20.3 was released a few hours ago and includes a fix for Drill-8190, so please test again using Drill 1.20.3.
Upvotes: 1