Sitemap
Tuncay Karaca

Tuncay Karaca

Consultant | SAP, Snowflake, Microsoft, Salesforce | Cloud, Analytics, Data, Integration, Development | (Independent) https://www.linkedin.com/in/tuncaykaraca/

SAP Analytics Cloud — “I cannot cancel an import job from SAP HANA”

Question & Answer on SAP Community

2 min readMay 2, 2024

--

I’ve recently helped solve a question from jlopezm on the SAP Community for SAP Analytics Cloud and SAP HANA Studio.

Press enter or click to view image in full size
Photo by Joanna Kosinska on Unsplash

jlopezm — Question

Hello SAP HANA and SAP Analytics Cloud experts,

I am having a problem running imports from SAP HANA to.

When I load an import:

  • It does not finish running in SAP Analytics Cloud. When I run it in SAP HANA Studio it takes 1 minute.
  • When I try to cancel it in SAP HANA Studio administration monitor with the command: ALTER SYSTEM CANCEL SESSION ‘239210’ with the corresponding connection number, it has disappeared because this number changes continuously.
  • In the thread details I can see that the query has (maybe by default) a limit of 10,000 and an OFFSET that is being expanded each time the connection ID changes.

How can I cancel this query? I have cancelled it in SAC but it is still running in the background.

Why is this limitation of 10,000 set automatically? Is this what is causing the connection ID to keep changing and I can’t cancel it?

Get Tuncay Karaca’s stories in your inbox

Join Medium for free to get updates from this writer.

Best regards and thank you very much!

TuncayKaraca — Answer

Hi @jlopezm,

SAP Analytics Cloud import job tries to get the query results in packages / sets with 10,000 in each. That’s why LIMIT set 10,000. Why it’s 10,000? I don’t know! Check out System Sizing, Tuning, and Limits OFFSETT skipping records for each package / set. That’s why it changes every time.

So there must be a kind of parent job to trigger a next sub / child job whenever you canceled the previous one. You may run this and check all RUNNING jobs. Reference How to kill/stop jobs in HANA !!

SELECT C.CONNECTION_ID, PS.STATEMENT_STRING
FROM M_CONNECTIONS C JOIN M_PREPARED_STATEMENTS PS
ON C.CONNECTION_ID = PS.CONNECTION_ID AND C.CURRENT_STATEMENT_ID = PS.STATEMENT_ID
WHERE C.CONNECTION_STATUS = 'RUNNING'
AND C.CONNECTION_TYPE = 'Remote'

Regards,
Tuncay

jlopezm —Comment

@TuncayKaraca Thank you very much for the response. The code did not reveal to me the parent job from which it was connecting, but it did help me (with some modification to look for the specific connection) to detect the continuously varying connection code, to quickly copy it and cancel it.

Once the specific operation is cancelled, the entire SAP Analytics Cloud import job is cancelled.

TuncayKaraca — Comment

@jlopezmYou are welcome! It’s good to hear you resolved the issue!

References

  1. jlopezm — Apr 17, 2024 —I cannot cancel an import in SAP Analytics Cloud from SAP Hana— SAP Community

--

--