@@ -459,10 +459,10 @@ <h2 is-upgraded>Setup your project for function deployment</h2>
459459iam_admin_client = iam_admin_v1.IAMClient()
460460request = types.CreateServiceAccountRequest()
461461
462+ account_id = "bigframes-no-permissions"
462463request.account_id = account_id
463464request.name = f"projects/{project_id}"
464465
465- account_id = "bigframes-no-permissions"
466466display_name = "bigframes remote function (no permissions)"
467467service_account = types.ServiceAccount()
468468service_account.display_name = display_name
@@ -480,6 +480,9 @@ <h2 is-upgraded>Setup your project for function deployment</h2>
480480bqclient.create_dataset(dataset, exists_ok=True)
481481</ code > </ pre >
482482< h2 is-upgraded > Deploying a remote function</ h2 >
483+ < p > Enable the Cloud Functions API if not yet already enabled.</ p >
484+ < pre > < code > !gcloud services enable cloudfunctions.googleapis.com
485+ </ code > </ pre >
483486< p > Now, deploy your function to the dataset you just created. Add a < code > @bpd.remote_function</ code > decorator to the function you created in the previous steps.</ p >
484487< pre > < code > import bigframes.pandas as bpd
485488
@@ -494,7 +497,7 @@ <h2 is-upgraded>Deploying a remote function</h2>
494497 # TODO: Replace this with your version of nltk.
495498 packages=["nltk==3.9.1"],
496499 # Replace this with your service account email.
497- cloud_function_service_account="bigframes-no-permissions@your-project-id .iam.gserviceaccount.com",
500+ cloud_function_service_account=f "bigframes-no-permissions@{project_id} .iam.gserviceaccount.com",
498501 cloud_function_ingress_settings="internal-only",
499502)
500503def lemmatize(word: str) -> str:
@@ -525,7 +528,7 @@ <h2 is-upgraded>Using the remote functions</h2>
525528bpd.options.bigquery.ordering_mode = "partial"
526529bpd.options.display.repr_mode = "deferred"
527530
528- lemmatize = bpd.read_gbq_function("swast-scratch .functions.lemmatize")
531+ lemmatize = bpd.read_gbq_function(f "{project_id} .functions.lemmatize")
529532
530533words = bpd.Series(["whiskies", "whisky", "whiskey", "vodkas", "vodka"])
531534words.apply(lemmatize).to_pandas()
0 commit comments