Populate the number of lines of inserted, updated data

Four Stars

Populate the number of lines of inserted, updated data

Hi,

In my project i have 200 jobs.
When executing a jobs some records are inserted,updated,rejected and retrived.
My question is i need joblet for this 200 jobs.
I need  to save  this info in database  table by using joblet, like no of records insert , update ,rejected,  retrieved  and job name, project name.

here i have attached the screen shots please find it.

job
===
 

Joblet
====
here i need to find no of insert and update records


Thanks
Sasi 

Community Manager

Re: Populate the number of lines of inserted, updated data

Hello  
There are some global variables defined on the database output component that counts the total number of inserted lines, updated lines rejected lines or deleted lines, eg:
((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED"))
So, you can use these variables in joblet. 
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Populate the number of lines of inserted, updated data

Great thanks shong,

In my joblet don't have data base output components. (if data base output components exits ,we will find global variables list)
I have tried in joblet, but  i don't find global variables list.
In my job i have 1 source input,1 target input, 2 output components(1 for insert and 1 for update records).
I need to find out insert ,update, retrieve records from every component(by using joblet)

Here i have attached the joblet please check.



In  job i can find no of records inserted,updated,rejected and retrieved.
(through tFixedFlowinput we can use this global variables).

Thanks
Sasi
Community Manager

Re: Populate the number of lines of inserted, updated data

Hi 
The global variables of the output component are also available in joblet, you can select them in the main job, copy the string and paste it to joblet. If you will use the same joblet in multiple job, I would suggest you to design the joblet like this:
trigger_input--onsubjobok--input---tMap--output

input: receive the global variables.
tMap: add external columns like projectName, jobName and so on.


in the main job:
...
  |
onsubjobok
  |
tfixedFlowInput--joblet--tLogRow

tFixedFlowInput: pass the global variables to joblet

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Populate the number of lines of inserted, updated data

Hi Shong,

when i am link(onsubjobok) triggerinput to input component it's not linking.
In joblet where  and how should i use Database output components for nb_line global varibles for multile jobs.
( I have used tFixedFlowinput for nb_lines),
is there any other component for nb_lines?
I tried ,what i am using in job, data base output components in joblet,but it's not working
please help on this, with detail info,
how to create a job let for this.
Community Manager

Re: Populate the number of lines of inserted, updated data

Hi 
As I suggested in previous post, use a tfixedFlowInput in the main job to pass the global variables to joblet. In joblet, define the same schema on INPUT component as tfixedFlowInput's schema.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Populate the number of lines of inserted, updated data

Hi,
[font=Calibri, sans-serif]Am created a joblet for Nb_line based on your previous post[/font]
[font=Calibri, sans-serif]You can check this once,below am attaching a screen shots.[/font]
1st I declare a global variables in tFixedFlowinput component in job,




In joblet,in input component am declare tFixedFlowinput schema


Then next joblet link to tFixedFlowinput in job.
In this job i can use only 2 output components,in my other jobs having 5 to 8 out put componets. that time how to create a joblet,how to define global varibles?
i want tFixedFlowinput in joblet,for creating a joblet
(in this job  tFixedFlowinput used in a job), i no need to change globla varibles every time in  tFixedFlowinput in job
output of this joblet
==========

please observe screen shots.
Community Manager

Re: Populate the number of lines of inserted, updated data

Hi
You have to change global variables on tFixedFlowInput every time, because each key is different from the global variable, so you need to use the joblet many times in the job for each output component. 

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Populate the number of lines of inserted, updated data

Hi
I have to read ComponentName and ComponentType  along with Source records ,inserted,updated,rejected etc....
for example i have to achieve the table like below from the job  
i have to read every component from a job 



please help on this as soon as possible

Thanks in advance

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

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch