@@ -59,7 +59,14 @@ def details(self, value: JobDetails):
59
59
@property
60
60
def container_name (self ):
61
61
"""Job input/output data container name"""
62
- return f"job-{ self .id } "
62
+
63
+ if self ._details .container_uri is None :
64
+ return f"job-{ self .id } "
65
+ else :
66
+ container_uri = self ._details .container_uri
67
+ path = urlparse (container_uri ).path
68
+ container_name = path .split ("/" )[1 ]
69
+ return container_name
63
70
64
71
@classmethod
65
72
def from_input_data (
@@ -323,7 +330,10 @@ def upload_attachment(
323
330
324
331
# Use Job's default container if not specified
325
332
if container_uri is None :
326
- container_uri = self .workspace .get_container_uri (job_id = self .id )
333
+ if self ._details .container_uri is None :
334
+ container_uri = self .workspace .get_container_uri (job_id = self .id )
335
+ else :
336
+ container_uri = self ._details .container_uri
327
337
328
338
uploaded_blob_uri = self .upload_input_data (
329
339
container_uri = container_uri ,
@@ -353,7 +363,10 @@ def download_attachment(
353
363
354
364
# Use Job's default container if not specified
355
365
if container_uri is None :
356
- container_uri = self .workspace .get_container_uri (job_id = self .id )
366
+ if self ._details .container_uri is None :
367
+ container_uri = self .workspace .get_container_uri (job_id = self .id )
368
+ else :
369
+ container_uri = self ._details .container_uri
357
370
358
371
container_client = ContainerClient .from_container_url (container_uri )
359
372
blob_client = container_client .get_blob_client (name )
0 commit comments