Scala examples for stored procedures created with SQL¶
Using Snowpark APIs for asynchronous processing¶
The following examples illustrate how you can use Snowpark APIs to begin asynchronous child jobs, as well as how those jobs behave under different conditions.
In the following example, the asyncWait procedure executes an asynchronous child job that waits 10 seconds.
In the following example, the cancelJob procedure uses SQL to start a job that would take 10 seconds to finish. It then cancels
the child job before it finishes.
In the following example, the checkStatus procedure executes an asynchronous child job that waits 10 seconds. The procedure then
checks on the status of the job before it finishes, so the check returns False.