Open AntoineGiraud opened 1 month ago
example of use case :
example :
DECLARE i INT64 DEFAULT 5;
FOR sql_alter_descr in (/* {select generating DDL alter table column set options descriptions commands } */)
DO
execute immediate sql_alter_descr.sql;
SET i = i + 1;
IF (i>=5) THEN
-- sleep of 10s every 5 DDL edits on a table
CALL bigfunctions.eu.sleep(10);
SET i = 0;
END IF;
END FOR;
Great @AntoineGiraud.
We should always prefer sql when it works.
However, I am wondering if the relation between number of iteration and time is really linear. Could you make some tests with seconds and minutes and check it works before opening a PR?
Check your idea has not already been reported
Edit
function_name
and the short idea description in title aboveTell us everything
current sleep BigFunctions uses cloud run & python ... therefore generating cost
Here is a all BigQuery SQL solution found on stackoverflow : is-there-a-wait-method-for-google-bigquery-sql
Shall I do a MR & swap existing sleep function to this SQL logic ?