dataproc-spark-connect 1.0.0rc4__tar.gz → 1.0.0rc5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/PKG-INFO +1 -1
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/dataproc_spark_connect.egg-info/PKG-INFO +1 -1
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/session.py +23 -9
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/setup.py +1 -1
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/LICENSE +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/README.md +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/dataproc_spark_connect.egg-info/SOURCES.txt +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/dataproc_spark_connect.egg-info/dependency_links.txt +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/dataproc_spark_connect.egg-info/requires.txt +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/dataproc_spark_connect.egg-info/top_level.txt +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/__init__.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/client/__init__.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/client/core.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/client/proxy.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/environment.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/exceptions.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/google/cloud/dataproc_spark_connect/pypi_artifacts.py +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/pyproject.toml +0 -0
- {dataproc_spark_connect-1.0.0rc4 → dataproc_spark_connect-1.0.0rc5}/setup.cfg +0 -0
|
@@ -593,20 +593,33 @@ class DataprocSparkSession(SparkSession):
|
|
|
593
593
|
self._check_python_version_compatibility(
|
|
594
594
|
dataproc_config.runtime_config.version
|
|
595
595
|
)
|
|
596
|
+
|
|
597
|
+
# Use local variable to improve readability of deeply nested attribute access
|
|
598
|
+
exec_config = dataproc_config.environment_config.execution_config
|
|
599
|
+
|
|
600
|
+
# Set service account from environment if not already set
|
|
596
601
|
if (
|
|
597
|
-
not
|
|
598
|
-
and "DATAPROC_SPARK_CONNECT_AUTH_TYPE" in os.environ
|
|
599
|
-
):
|
|
600
|
-
dataproc_config.environment_config.execution_config.authentication_config.user_workload_authentication_type = AuthenticationConfig.AuthenticationType[
|
|
601
|
-
os.getenv("DATAPROC_SPARK_CONNECT_AUTH_TYPE")
|
|
602
|
-
]
|
|
603
|
-
if (
|
|
604
|
-
not dataproc_config.environment_config.execution_config.service_account
|
|
602
|
+
not exec_config.service_account
|
|
605
603
|
and "DATAPROC_SPARK_CONNECT_SERVICE_ACCOUNT" in os.environ
|
|
606
604
|
):
|
|
607
|
-
|
|
605
|
+
exec_config.service_account = os.getenv(
|
|
608
606
|
"DATAPROC_SPARK_CONNECT_SERVICE_ACCOUNT"
|
|
609
607
|
)
|
|
608
|
+
|
|
609
|
+
# Auto-set authentication type to SERVICE_ACCOUNT when service account is provided
|
|
610
|
+
if exec_config.service_account:
|
|
611
|
+
# When service account is provided, explicitly set auth type to SERVICE_ACCOUNT
|
|
612
|
+
exec_config.authentication_config.user_workload_authentication_type = (
|
|
613
|
+
AuthenticationConfig.AuthenticationType.SERVICE_ACCOUNT
|
|
614
|
+
)
|
|
615
|
+
elif (
|
|
616
|
+
not exec_config.authentication_config.user_workload_authentication_type
|
|
617
|
+
and "DATAPROC_SPARK_CONNECT_AUTH_TYPE" in os.environ
|
|
618
|
+
):
|
|
619
|
+
# Only set auth type from environment if no service account is present
|
|
620
|
+
exec_config.authentication_config.user_workload_authentication_type = AuthenticationConfig.AuthenticationType[
|
|
621
|
+
os.getenv("DATAPROC_SPARK_CONNECT_AUTH_TYPE")
|
|
622
|
+
]
|
|
610
623
|
if (
|
|
611
624
|
not dataproc_config.environment_config.execution_config.subnetwork_uri
|
|
612
625
|
and "DATAPROC_SPARK_CONNECT_SUBNET" in os.environ
|
|
@@ -673,6 +686,7 @@ class DataprocSparkSession(SparkSession):
|
|
|
673
686
|
f"DATAPROC_SPARK_CONNECT_DEFAULT_DATASOURCE is set to an invalid value:"
|
|
674
687
|
f" {default_datasource}. Supported value is 'bigquery'."
|
|
675
688
|
)
|
|
689
|
+
|
|
676
690
|
return dataproc_config
|
|
677
691
|
|
|
678
692
|
def _check_python_version_compatibility(self, runtime_version):
|
|
@@ -20,7 +20,7 @@ long_description = (this_directory / "README.md").read_text()
|
|
|
20
20
|
|
|
21
21
|
setup(
|
|
22
22
|
name="dataproc-spark-connect",
|
|
23
|
-
version="1.0.
|
|
23
|
+
version="1.0.0rc5",
|
|
24
24
|
description="Dataproc client library for Spark Connect",
|
|
25
25
|
long_description=long_description,
|
|
26
26
|
author="Google LLC",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|