Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bigframes/functions/_function_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,12 @@ def udf(
BigQuery managed function.

.. note::
The udf must be self-contained, i.e. it must not contain any
This feature is in preview. The code in the udf must be
(1) self-contained, i.e. it must not contain any
references to an import or variable defined outside the function
body.
body, and
(2) Python 3.11 compatible, as that is the environment
in which the code is executed in the cloud.

.. note::
Please have following IAM roles enabled for you:
Expand Down Expand Up @@ -801,7 +804,7 @@ def udf(
https://pip.pypa.io/en/stable/reference/requirements-file-format/.
"""

warnings.warn("udf is in preview.", category=bfe.PreviewWarning)
warnings.warn("udf is in preview.", category=bfe.PreviewWarning, stacklevel=5)

# Some defaults may be used from the session if not provided otherwise.
session = self._resolve_session(session)
Expand Down
7 changes: 5 additions & 2 deletions bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,9 +1426,12 @@ def udf(
[BigQuery managed user-defined function](https://cloud.google.com/bigquery/docs/user-defined-functions-python).

.. note::
The udf must be self-contained, i.e. it must not contain any
This feature is in preview. The code in the udf must be
(1) self-contained, i.e. it must not contain any
references to an import or variable defined outside the function
body.
body, and
(2) Python 3.11 compatible, as that is the environment
in which the code is executed in the cloud.

.. note::
Please have BigQuery Data Editor (roles/bigquery.dataEditor) IAM
Expand Down