Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Can I store database insert results in a table?

I created a job that puts data into a table 

 

0683p000009M8j1.png

 

0683p000009M8is.png
insert into t1 select * from emp where deptno=20;

 

I want to save the work result to a table.

 

0683p000009M8j6.png

 

LNUM = PK

STIME = Start time

ETIME = end time

DMLTYPE = INSERT, UPDATE , DELETE 

ROWVAL = DML row count

ERRVAL = error values

 

 

0683p000009M8jB.png

 

How can I get these results?

Labels (4)
3 Replies
Anonymous
Not applicable
Author

In the end of job, you can use a tFixedFlowInput to generate this kind of log messages and insert them to DB. I have question about the LNUM column, are there might be several PK values in your query?
Anonymous
Not applicable
Author

There is no PK in the LNUM column.

 

Plan to add later
 
When I get used to it
Anonymous
Not applicable
Author

There are three global variables pre-defined on DB output components, these variables stores the total number of lines are inserted/updated/deleted, and you can also check the value of these variables to get the DMLTYPE.
These global variables includes:
((Integer)globalMap.get("tDBOutput_1_NB_LINE_UPDATED"))
((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED"))((Integer)globalMap.get("tDBOutput_1_NB_LINE_DELETED"))