We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7517e0e commit f4f219aCopy full SHA for f4f219a
sdks/python/apache_beam/io/gcp/bigquery.py
@@ -361,6 +361,7 @@ def chain_after(result):
361
import json
362
import logging
363
import random
364
+import secrets
365
import time
366
import uuid
367
import warnings
@@ -2925,8 +2926,9 @@ def __init__(
2925
2926
self.table = table
2927
self.validate()
2928
- # We use this internal object ID to generate BigQuery export directories.
2929
- self.obj_id = random.randint(0, 100000)
+ # We use this internal object ID to generate BigQuery export directories
2930
+ # and to create BigQuery job names
2931
+ self.obj_id = '%d_%s' % (int(time.time()), secrets.token_hex(3))
2932
2933
def validate(self):
2934
if self.table is not None and self.query is not None:
0 commit comments