tmap display

Four Stars

tmap display

TableTimeEntries.PNGtable custom_values.PNG

 

hello , 

Ihave two tables in mysql and i want to write in one file excel.

the two tabes are :

Table TimeEntrie and table CustomValue.

 

- My problem is : I want to store in one file excell all the data that matches with the condition below:

 

 

1 -  the timeentrie wich have the project_code == Custom_value.customized_id

And  for these timeentries select All 

 

2- that have custom_value.custom_field_id=13 or   custom_value.custom_field_id=19

and 

3- that have custom_value.custom_typeequals ("Project") 

 

Can anyone can help me ? 

thanks

custom 

 

 

 

My probCapture.PNGtmap.PNG

Highlighted
Employee

Re: tmap display

Hi,

 

    You can add the necessary conditions in the expression editor in the output section of the tMap and can pass the values to output file. If you want the data to be written in same file, you can do it by selecting append option in tfileoutputexcel.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Four Stars

Re: tmap display

I have tried to do this but the output result is diffrent of the espected
result.
Four Stars

Re: tmap display

I have tried to configure tmap but the result is different of the espected result.

Please can you give me an example of thsi configuration . 

 

Seven Stars

Re: tmap display

 

Hello toumakabibiche,

 

here is an example of how I would try to resolve your question:

 

tmap_display.jpgtMap configuration

 

 

Best regards,

 

Thomas

 

 

 

 

 

 

Four Stars

Re: tmap display

thanks to your reply Thwabi .

I have tried to like this but i have a null pointer exception :

In the table timeentrries i have 43164 data but the tmap  entries receive only 54 data .

my scrennshots are : 

Four Stars

Re: tmap display

Captureend.PNGCapturenullpointer.PNGCapturetmap.PNGCapturetmapinterne.PNGCapturetmap.PNGExpression.PNG

Seven Stars

Re: tmap display

Hello toumakabibiche,

 

may I recommend using customvalues1.customized_type = 'Project' as a where condition in your input SQL of the custom_values component instead of using it in tMap (as a filter or join condition)?

 

I suggest not connecting customvalues1.custom_field_id and customvalues1.value directly to the output pane (to "client" and "demande"). Put them in the Var pane first, and from there connect them to the output.

 

Concerning the NullpointerException: Please insert a query for null value in your Var.var1 expression, in general for all the fields from customvalues1 that you connected to the Var pane. For example: customvalues1.custom_field_id == null ? 0 : customvalues1.custom_field_id and name this field notnull_custom_field_id. You can then continue to build your other expressions in the Var pane using this notnull_custom_field_id (instead of the custom_field_id directly from costumvalues1).

 

Best regards,

 

Thomas

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download