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
3- that have custom_value.custom_typeequals ("Project")
Can anyone can help me ?
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.
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 :-)
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 :
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).
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Practical steps to developing your data integration strategy.