Skip to content

Commit ef63772

Browse files
jialuootswast
andauthored
docs: add details for bigquery_connection in @bpd.udf docstring (#1609)
* chore: add details for bigquery_connection in udf docstring * quick fix * Update bigframes/functions/_function_session.py Co-authored-by: Tim Sweña (Swast) <swast@google.com> * resolve the comments * sync the docstring --------- Co-authored-by: Tim Sweña (Swast) <swast@google.com>
1 parent b03e44f commit ef63772

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

bigframes/functions/_function_session.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,13 @@ def udf(
775775
Name of the BigQuery connection. It is used to provide an
776776
identity to the serverless instances running the user code. It
777777
helps BigQuery manage and track the resources used by the udf.
778+
This connection is required for internet access and for
779+
interacting with other GCP services. To access GCP services, the
780+
appropriate IAM permissions must also be granted to the
781+
connection's Service Account. When it defaults to None, the udf
782+
will be created without any connection. A udf without a
783+
connection has no internet access and no access to other GCP
784+
services.
778785
name (str, Optional):
779786
Explicit name of the persisted BigQuery managed function. Use it
780787
with caution, because more than one users working in the same

bigframes/session/__init__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,12 +1513,16 @@ def udf(
15131513
format. If this parameter is not provided then session dataset
15141514
id is used.
15151515
bigquery_connection (str, Optional):
1516-
Name of the BigQuery connection. You should either have the
1517-
connection already created in the `location` you have chosen, or
1518-
you should have the Project IAM Admin role to enable the service
1519-
to create the connection for you if you need it. If this
1520-
parameter is not provided then the BigQuery connection from the
1521-
session is used.
1516+
Name of the BigQuery connection. It is used to provide an
1517+
identity to the serverless instances running the user code. It
1518+
helps BigQuery manage and track the resources used by the udf.
1519+
This connection is required for internet access and for
1520+
interacting with other GCP services. To access GCP services, the
1521+
appropriate IAM permissions must also be granted to the
1522+
connection's Service Account. When it defaults to None, the udf
1523+
will be created without any connection. A udf without a
1524+
connection has no internet access and no access to other GCP
1525+
services.
15221526
name (str, Optional):
15231527
Explicit name of the persisted BigQuery managed function. Use it
15241528
with caution, because more than one users working in the same

0 commit comments

Comments
 (0)