|
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | 15 |
|
16 | | -def test_multimodal_dataframe() -> None: |
| 16 | +def test_multimodal_dataframe(gcs_dst_bucket: str) -> None: |
| 17 | + # destination folder must be in a GCS bucket that the BQ connection service account (default or user provided) has write access to. |
| 18 | + dst_bucket = gcs_dst_bucket |
17 | 19 | # [START bigquery_dataframes_multimodal_dataframe_create] |
18 | 20 | import bigframes |
19 | 21 |
|
@@ -52,21 +54,21 @@ def test_multimodal_dataframe() -> None: |
52 | 54 |
|
53 | 55 | # [START bigquery_dataframes_multimodal_dataframe_image_transform] |
54 | 56 | df_image["blurred"] = df_image["image"].blob.image_blur( |
55 | | - (20, 20), dst="gs://bigframes_blob_test/image_blur_transformed/" |
| 57 | + (20, 20), dst=f"{dst_bucket}/image_blur_transformed/" |
56 | 58 | ) |
57 | 59 | df_image["resized"] = df_image["image"].blob.image_resize( |
58 | | - (300, 200), dst="gs://bigframes_blob_test/image_resize_transformed/" |
| 60 | + (300, 200), dst=f"{dst_bucket}/image_resize_transformed/" |
59 | 61 | ) |
60 | 62 | df_image["normalized"] = df_image["image"].blob.image_normalize( |
61 | 63 | alpha=50.0, |
62 | 64 | beta=150.0, |
63 | 65 | norm_type="minmax", |
64 | | - dst="gs://bigframes_blob_test/image_normalize_transformed/", |
| 66 | + dst=f"{dst_bucket}/image_normalize_transformed/", |
65 | 67 | ) |
66 | 68 |
|
67 | 69 | # You can also chain functions together |
68 | 70 | df_image["blur_resized"] = df_image["blurred"].blob.image_resize( |
69 | | - (300, 200), dst="gs://bigframes_blob_test/image_blur_resize_transformed/" |
| 71 | + (300, 200), dst=f"{dst_bucket}/image_blur_resize_transformed/" |
70 | 72 | ) |
71 | 73 | df_image |
72 | 74 | # [END bigquery_dataframes_multimodal_dataframe_image_transform] |
|
0 commit comments