diff --git a/dlt/common/configuration/specs/gcp_credentials.py b/dlt/common/configuration/specs/gcp_credentials.py index 21ae2587ed..17519b032a 100644 --- a/dlt/common/configuration/specs/gcp_credentials.py +++ b/dlt/common/configuration/specs/gcp_credentials.py @@ -356,3 +356,9 @@ def parse_native_representation(self, native_value: Any) -> None: except NativeValueError: pass GcpOAuthCredentialsWithoutDefaults.parse_native_representation(self, native_value) + + def to_pyiceberg_fileio_config(self) -> Dict[str, Any]: + if self.has_default_credentials(): + return GcpDefaultCredentials.to_pyiceberg_fileio_config(self) + else: + return GcpOAuthCredentialsWithoutDefaults.to_pyiceberg_fileio_config(self) diff --git a/tests/load/utils.py b/tests/load/utils.py index 7835927f5c..5660202ec3 100644 --- a/tests/load/utils.py +++ b/tests/load/utils.py @@ -636,14 +636,7 @@ def destinations_configs( table_format="iceberg", supports_merge=False, file_format="parquet", - credentials=( - resolve_configuration( - GcpOAuthCredentialsWithoutDefaults(), - sections=("destination", "fsgcpoauth"), - ) - if bucket == GCS_BUCKET - else None - ), + destination_name="fsgcpoauth" if bucket == GCS_BUCKET else None, ) ]