Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sasi8008
Contributor
Contributor

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
===
  0683p000009MHNj.png

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

0683p000009MHMr.png
Thanks
Sasi 

Labels (2)
8 Replies
Anonymous
Not applicable

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
sasi8008
Contributor
Contributor
Author

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.

0683p000009MHNo.png

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

Thanks
Sasi
Anonymous
Not applicable

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
sasi8008
Contributor
Contributor
Author

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.
Anonymous
Not applicable

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
sasi8008
Contributor
Contributor
Author

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,
0683p000009MHNt.png



In joblet,in input component am declare tFixedFlowinput schema
0683p000009MHNy.png

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
==========
0683p000009MHO3.png
please observe screen shots.
Anonymous
Not applicable

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
sasi8008
Contributor
Contributor
Author

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 

0683p000009MHO8.png

please help on this as soon as possible

Thanks in advance