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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jensej
Creator
Creator

tLogCatcher catching some Exceptions in tbInput but others not

Hi guys!

Im using tLogCather to write values into my log table in the Database.

If there is something catched from tLogCatcher one row will be produced with message and origin.

 

I tried to create errors in the sql in a tbInput component to see if a row was printed.

 

If i run the query below 1 row will be created exactly as I wish with this message "org.postgresql.util.PSQLException:ERROR: column "id" does not exist

Position: 43"

 

select id,

lastname

,

firstname

union all

select id::text,name,firstname from persons WHERE name IS NOT NULL LIMIT

3

 

 

If I then slightly change the sql to this which also is not a correct query. I get the a message in the console showing

"Exception in component tDBInput_4 (All_DB_SQL_v4)

org.postgresql.util.PSQLException: ERROR: column "id" does not exist

 Position: 43"

 

but this time logcatcher doesn't catch anything and no row will be created in my database.

 

select id,

'lastname'

,

'firstname'

union all

select id::text,name,firstname from persons WHERE name IS NOT NULL LIMIT

3

How could that be?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

The tLogCatcher component operates as a log function triggered by one of the three: Java exception, tDie or tWarn, to collect and transfer log data.

If you have an error due to a sql syntax error or any technical error, the full job is rejected and an exception is thrown.

Each record which cannot be injected due to an error at runtime give a rejection (invalid date, string too long, unknown parent) that you can catch using the reject flow after the tDBOutput component and as Rejected records from tDBOutput are not catched by tLogCatcher.

Just connect a tFileOutputDelimited (or other component) after tDBOuput using the "Reject" flow (right click).

 

Best regards

Sabrina

View solution in original post

1 Reply
Anonymous
Not applicable

Hello,

The tLogCatcher component operates as a log function triggered by one of the three: Java exception, tDie or tWarn, to collect and transfer log data.

If you have an error due to a sql syntax error or any technical error, the full job is rejected and an exception is thrown.

Each record which cannot be injected due to an error at runtime give a rejection (invalid date, string too long, unknown parent) that you can catch using the reject flow after the tDBOutput component and as Rejected records from tDBOutput are not catched by tLogCatcher.

Just connect a tFileOutputDelimited (or other component) after tDBOuput using the "Reject" flow (right click).

 

Best regards

Sabrina