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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
kaba
Contributor
Contributor

Call PostgreSQL procedure from Qlik Automation Block

HI, In Qlik Automation I’m calling a PostgreSQL procedure using the Postgre>Do Query block:

I simply put into 'Query *' field:
call schema.procedure_name();

The block usually keeps running for a 2 hours 5 minutes or eventually times out, even though in PostgreSQL the procedure is triggered immediately and finishes in less than a millisecond (based on my logs).

Do you have any experience or recommended block/workaround for this?

Thanks!

 

Labels (2)
4 Replies
marksouzacosta
MVP
MVP

Hi @kaba,

I'm not able to test it but my guess is that the Do Query block is probably expecting your stored procedure to return something. I would try something like this in the Do Query block and see if it works:

CALL schema.procedure_name();
SELECT NOW() AS current_datetime;

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

kaba
Contributor
Contributor
Author

Thank you @marksouzacosta,

the problem is its not possible to run 2 queries like this in a in a  Do Query block.
I tried to wrap it into a function returning one value, but it doesn't seem to have any effect.

SELECT scheme.run_procedure_name();



FaizanMirza
Contributor
Contributor

Hi @marksouzacosta @kaba  Even I face the Same issue I created an Automation to write Directly into Postgress SQL through Qlik Writeback Table here: I was able to make the connection but the Query Doesn't work nor do the Insertion operation

FaizanMirza_0-1769678816311.png

 

NS_Qlikupdates
Partner - Creator
Partner - Creator

If you're looking to handle PostgreSQL-based data updates from Qlik, SenseOps Writeback could be a good fit. It supports writing data to PostgreSQL from Qlik, providing an alternative to relying on Qlik Automation for database operations.

You can learn more about SenseOps Writeback here: Overview - SenseOps Documentation