Created
April 16, 2025 23:46
-
-
Save jeremyyeo/5ee966a4f869ad94b3e64edfc687c60f to your computer and use it in GitHub Desktop.
Pseudo-sleep function for BQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function dbt_jyeo.fake_sleep(seconds int64) | |
returns string | |
language python | |
options(runtime_version="python-3.11", entry_point="main") | |
as r''' | |
# python function takes time to spin up so this is a lower bound (wait at minimum). | |
import time | |
def main(seconds): | |
time.sleep(seconds) | |
return f'waited at least {seconds} seconds' | |
'''; | |
select dbt_jyeo.fake_sleep(120); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment