Skip to content

Commit

Permalink
docs: make the code samples reflect default bq connection usage (#206)
Browse files Browse the repository at this point in the history
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes internal issue 305136837 🦕
  • Loading branch information
shobsi authored and Genesis929 committed Dec 12, 2023
1 parent 94e1852 commit d47f5e8
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 283 deletions.
4 changes: 2 additions & 2 deletions notebooks/getting_started/getting_started_bq_dataframes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
"source": [
"Running the cell below creates a custom function using the `remote_function` method. This function categorizes a value into one of two buckets: >= 4000 or <4000.\n",
"\n",
"> Note: Creating a function requires a [BigQuery connection](https://cloud.google.com/bigquery/docs/remote-functions#create_a_remote_function). This code assumes a pre-created connection named `bigframes-rf-conn`. If\n",
"> Note: Creating a function requires a [BigQuery connection](https://cloud.google.com/bigquery/docs/remote-functions#create_a_remote_function). This code assumes a pre-created connection named `bigframes-default-connection`. If\n",
"the connection is not already created, BigQuery DataFrames attempts to create one assuming the [necessary APIs\n",
"and IAM permissions](https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.pandas#bigframes_pandas_remote_function) are set up in the project.\n",
"\n",
Expand All @@ -817,7 +817,7 @@
},
"outputs": [],
"source": [
"@bf.remote_function([float], str, bigquery_connection='bigframes-rf-conn')\n",
"@bf.remote_function([float], str)\n",
"def get_bucket(num):\n",
" if not num: return \"NA\"\n",
" boundary = 4000\n",
Expand Down

0 comments on commit d47f5e8

Please sign in to comment.