kernel_integrations_var = os.getenv("KAGGLE_KERNEL_INTEGRATIONS")
def init():
bq_user_jwt = os.getenv("KAGGLE_USER_SECRETS_TOKEN")
if kaggle_proxy_token or bq_user_jwt:
from google.auth import credentials, environment_vars
from google.cloud import bigquery
from google.cloud.bigquery._http import Connection
After Change
kernel_integrations_var = os.getenv("KAGGLE_KERNEL_INTEGRATIONS")
def init():
is_jwe_set = "KAGGLE_USER_SECRETS_TOKEN" in os.environ
if kaggle_proxy_token or is_jwe_set:
init_bigquery()
if is_jwe_set:
if get_integrations().has_gcs():
init_gcs()
def init_bigquery():
from google.auth import credentials, environment_vars
from google.cloud import bigquery
from google.cloud.bigquery._http import Connection