Forum Discussion
3 Replies
- SupratimContributor III
@Mahesh7225 There is no in built snap available. You can use below python script to wait. But in case of 10/15mins to wait should use scheduler to trigger.
import time
Import the interface required by the Script snap.
from com.snaplogic.scripting.language import ScriptHook
class TransformScript(ScriptHook):
def init(self, input, output, error, log):
self.input = input
self.output = output
self.error = error
self.log = log# The "execute()" method is called once when the pipeline is started # and allowed to process its inputs or just send data to its outputs. def execute(self): while self.input.hasNext(): data = self.input.next() time.sleep(10) self.output.write(data) self.log.info("Finished executing the Transform script")
The Script Snap will look for a ScriptHook object in the “hook”
variable. The snap will then call the hook’s “execute” method.
hook = TransformScript(input, output, error, log)
- Mahesh7225New Contributor
Thanks from reply , Do you have any sample pipeline ?
Thanks
Mahesh- vineeshaEmployee
Hi,
Below is the sample pipeline that can be used to delay time. Right now this pipeline has delay time of 89 sec, you can change that according to your preference.sleep_2021_01_29.slp (3.7 KB)