Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left Join Help !!

Hi,

I need to do Left Join for these tables.

My requirement is Country from left table and Latitude & Longitude from right table.

Let me know, how to do this in editor.

1 Solution

Accepted Solutions
amit_saini
Master III
Master III

Hi Murali,

Try this:

Table1:

LOAD *,


FROM

Customer_table;

Left Join(Table1)

LOAD *,


FROM

LatLong;


Country will be become Primary key during this join.



Thanks,

AS

View solution in original post

8 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Customer:

LOAD

*

FROM Customer;

LEFT JOIN (Customer)

LOAD

*

FROM Latlng;

both the tables joined based on the Country.

Regards,

Jagan.

Not applicable
Author

Can try like this:

Table1:
Load Country
from customertable

Left join (Table1)

Load Country,Latitude,Longitude
from LatLng;

By default the tables will be joined on Country. If you want all the fields then you can use * instead of particular field names.

Hope this helps!

amit_saini
Master III
Master III

Hi Murali,

Try this:

Table1:

LOAD *,


FROM

Customer_table;

Left Join(Table1)

LOAD *,


FROM

LatLong;


Country will be become Primary key during this join.



Thanks,

AS

vijetas42
Specialist
Specialist

Hi,

You can write script as,

CustomerTable:

LOAD Customer

From CustomerTable ;

LEFT JOIN(CustomerTable)

LatLng:

LOAD *

From LatLng ;

Hope this will help you

Regards,

Vijeta

MK_QSL
MVP
MVP

Load * From customertable;

Load * From LatLng

Where Exists (Customer);

Not applicable
Author

thanks for your responses !! I got it.

MK_QSL
MVP
MVP

Kindly close the thread by selecting appropriate answer.

Not applicable
Author

Hi Saini,

Thanks it worked finally !!