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: 
mr_burns
Contributor
Contributor

tDBOutput (mySQL): truncate and 'Insert or update' keeps table empty

Hi,

I have a tDBOutput component which reads data from a tRest component and writes it into a mySQL table:

0695b00000bHj1uAAC.png

The property 'Action on Table' of tDBOutput_1 (mytable) is set to 'Default' and 'Action on data' is set to 'Insert or update'.

If I run the job then I can see the data in mySQL table as expected.

Now I want to truncate the mySQL table each time the job is running to get 'fresh' data and consider deleted records in the source table.

Here my problem:

I set the property 'Action on Table' of tDBOutput_1 (mytable) to 'Truncate' and 'Action on data' keep as 'Insert or update'.

If I run the job now the mySQL table is empty.

I expected that 'Action on table' = 'Truncate' truncates the table and 'Action on data' = 'insert or update' inserts the data again.

But as I mentioned the table is empty.

What I am misisng? How to delete/truncate the table each time the job is running ?

Thanks...

Labels (3)
1 Reply
Anonymous
Not applicable

Hi

From your screenshot, I see 0 rows are extracted from response string, add a tLogRow before tDBOutput to check if there has data.

 

Regards

Shong