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
21 changes: 15 additions & 6 deletions notebooks/audience_e2e_advertiser_flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
" View source on GitHub</a>\n",
" </td>\n",
" </table>"
]
],
"id": "cdd998cb"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -273,7 +274,7 @@
" desktop_app_json_file = \"/tmp/oauth_client.json\"\n",
"\n",
" if len(uploaded) != 1:\n",
" raise ValueError(\"Please upload exactly one file.\")\n",
" raise ValueError(\"Upload exactly one file.\")\n",
"\n",
" filename = list(uploaded.keys())[0]\n",
" content = uploaded[filename]\n",
Expand All @@ -290,7 +291,7 @@
"\n",
" if authentication_method == \"OAuth Client Credentials\":\n",
" if use_existing_credentials:\n",
" print(\"Please enter your OAuth credentials:\")\n",
" print(\"Enter your OAuth credentials:\")\n",
" client_id = input(\"Client ID: \").strip()\n",
" client_secret = getpass.getpass(\"Client Secret (input will be hidden): \").strip()\n",
" refresh_token = getpass.getpass(\"Refresh Token (input will be hidden): \").strip()\n",
Expand All @@ -304,7 +305,7 @@
" scopes=[data_manager_scope]\n",
" )\n",
" else:\n",
" print(\"Authenticating with OAuth via gcloud...\")\n",
" print(\"Authenticating with OAuth Client using gcloud...\")\n",
" client_json_file = prompt_for_desktop_client_json()\n",
" auth_command = (\n",
" f\"gcloud auth application-default login \"\n",
Expand Down Expand Up @@ -430,7 +431,7 @@
"\n",
"if not destination_id:\n",
" print(\n",
" \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n",
" \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n",
" )\n",
"else:\n",
" print(f\"Ingesting sample data to User List {destination_id}...\")\n",
Expand Down Expand Up @@ -493,6 +494,14 @@
" print(\"----------------------------\\n\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [],
"id": "c93a9f18"
},
{
"cell_type": "markdown",
"id": "68eab82f",
Expand Down Expand Up @@ -561,5 +570,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 5
}
19 changes: 14 additions & 5 deletions notebooks/audience_e2e_data_partner_dual_persona.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
" View source on GitHub</a>\n",
" </td>\n",
" </table>"
]
],
"id": "e31a76c3"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -302,7 +303,7 @@
" uploaded = files.upload()\n",
"\n",
" if len(uploaded) != 1:\n",
" raise ValueError(\"Please upload exactly one file\")\n",
" raise ValueError(\"Upload exactly one file\")\n",
"\n",
" filename = list(uploaded.keys())[0]\n",
" content = uploaded[filename]\n",
Expand Down Expand Up @@ -350,7 +351,7 @@
" print(\"Using existing Advertiser OAuth credentials\")\n",
" print()\n",
" # Prompts the user for the client ID, client secret, and refresh token.\n",
" print(\"Please enter your preexisting Advertiser OAuth credentials:\")\n",
" print(\"Enter your preexisting Advertiser OAuth credentials:\")\n",
" advertiser_oauth_client_id = input(\"Client ID: \").strip()\n",
" advertiser_oauth_client_secret = getpass.getpass(\n",
" \"Client Secret (input will be hidden): \"\n",
Expand Down Expand Up @@ -600,7 +601,7 @@
"\n",
"if not destination_id:\n",
" print(\n",
" \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n",
" \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n",
" )\n",
"else:\n",
" print(f\"Ingesting sample data to User List {destination_id}...\")\n",
Expand Down Expand Up @@ -664,6 +665,14 @@
" print(\"----------------------------\\n\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [],
"id": "1cc3db4d"
},
{
"cell_type": "markdown",
"id": "c4eab526",
Expand Down Expand Up @@ -732,5 +741,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 5
}
11 changes: 9 additions & 2 deletions notebooks/audience_e2e_data_partner_simplified.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
},
{
"cell_type": "markdown",
"id": "7f243813",
"metadata": {},
"source": [
" <table class=\"tfo-notebook-buttons nocontent\" align=\"left\">\n",
Expand Down Expand Up @@ -391,6 +392,12 @@
" print(f\"Resource Name: {ulist_res.name}\")\n",
" print(f\"Display Name: {ulist_res.display_name}\")\n",
"\n",
"except exceptions.PermissionDenied as e:\n",
" print(f\"User list creation failed due to permission denied error: {e}\")\n",
" print(\n",
" \"Review the 'Prerequisites' section and verify that the service account has the required \"\n",
" \"access level in the data partner account.\"\n",
" )\n",
"except Exception as e:\n",
" print(f\"Failed to create User List: {e}\")\n",
"\n",
Expand Down Expand Up @@ -430,7 +437,7 @@
"\n",
"if not destination_id:\n",
" print(\n",
" \"Error: destination_id is not set. Cannot ingest data. Please ensure the User List was created successfully in the previous step.\"\n",
" \"Error: destination_id is not set. Cannot ingest data. Make sure the User List was created successfully in the previous step.\"\n",
" )\n",
"else:\n",
" print(f\"5. Ingesting sample data to User List {destination_id}...\")\n",
Expand Down Expand Up @@ -612,5 +619,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 5
}