Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have two tables
book |
---|
austin |
jimmy |
geography |
---|
austin |
jimmy |
london |
paris |
new york |
denmark |
holland |
now austin and jimmy does not actually come under geography but they are there in the table,
london, paris, newyork and denmark come under austin and holland come under jimmy.
now what i want to do is mapping between these two tables so that when i click austin from book table only london paris newyork and denmark should get selected from geography table and when i click jimmy only holland should be selected from geography table.
Hi,
Use Inline table to map
BookAuthor:
LOAD * INLINE [
Book
Austin
Jimmy
];
Book_Geography:
LOAD * INLINE [
Book, Geography
Austin, london
Austin, paris
Austin, newyork
Austin, denmark
Jimmy, holland
];
Regards,
Try to load your table like this way
Book:
LOAD * INLINE [
Book
Austin
Jimmy
];
Geography:
LOAD If(Match(Geography,'london','paris','newyork','denmark'),'Austin',
if(Match(Geography,'holland'),'Jimmy')) as Book,Geography;
LOAD * INLINE [
Geography
london
paris
newyork
denmark
holland
Austin
Jimmy
]Where not Match(Geography,'Austin','Jimmy');
can i do it using applymap
mapbook:
mapping load * inline [
from,to
london, austin
paris, austin
new york, austin
denmark, austin
holland, jimmy
];
geography:
load geography, ApplyMap('mapbook', geography) as book;
load * inline [
geography
london
paris
new york
denmark
holland
];
But you have to hard code the table and do the mapping load for the table Book.
Book:
Mapping LOAD * INLINE [
Geography,Book
london,Austin
paris,Austin
newyork,Austin
denmark,Austin
holland,Jimmy];
Geography:
LOAD Geography,ApplyMap('Book',Geography) as Book;
LOAD * INLINE [
Geography
london
paris
newyork
denmark
holland];