Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Applymap Table

Hi everyone,

Appreciate your advise on below:

Currently I have 2 data source  A and B. These two are different data source. The link between these two data source is Date.

* My question :

I want to create applymap table for Data B., but I want to load the data B , based on Date in A. If there is no date in A it will not load the unused data in applyMap table B.

This is because Data in B are too huge almost millions records. So I dont want to load all data but load based on Date in A.

How can I do this in applymap function?

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

CheckTable:

LOAD DISTINCT DateFieldA

FROM SourceA;

MappingTable:

Mapping

LOAD Column1,

          Column2

FROM SourceB

Where Exists(DateFieldA, DateFieldB);

TableA:

LOAD AllFields,

          ApplyMap('MappingTable', ....) as ...

FROM SourceA;

View solution in original post

5 Replies
Not applicable
Author

why u need apply map?

You can just left join data A left join  Data B.

keep both the table date fields as Date.

sorrakis01
Specialist
Specialist

Hi,

Khushboo is right you need use Left Join to do this.

Regards

Not applicable
Author

Hi Khusboo,

I have used applymap because i need the field value in Data B, meaning that there are combination in field in data A and B. If the combination field match i will do applymap.

The question that I asked because it takes time for me to load data for applymap table. So if i can drill down the criteria where it load data B based on date in A. If i can reduce the time of loading the mapping table it will be better way for me. FYI i have 6 mapping table and for one table it contains millions of records.

Currently for 1 month data it takes around 20 minutes to load the map table.

sunny_talwar

May be like this:

CheckTable:

LOAD DISTINCT DateFieldA

FROM SourceA;

MappingTable:

Mapping

LOAD Column1,

          Column2

FROM SourceB

Where Exists(DateFieldA, DateFieldB);

TableA:

LOAD AllFields,

          ApplyMap('MappingTable', ....) as ...

FROM SourceA;

Not applicable
Author

Hi Sunny ,

It works for me. Thanks so much!!