Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workspace selection #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
24 changes: 17 additions & 7 deletions Simple ETL Example/Simple ETL Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"systemlink": {
"interfaces": [
"ni-files"
],
],
"outputs": [
{
"display_name": "Test Result ID",
Expand Down Expand Up @@ -177,12 +177,22 @@
"get_workspaces_resp.raise_for_status()\n",
"\n",
"# Print the list of workspaces you may choose to create the test result and datatable in\n",
"workspaces = get_workspaces_resp.json()[\"workspaces\"]\n",
"workspaces = {w[\"name\"]: w for w in get_workspaces_resp.json()[\"workspaces\"] if w[\"enabled\"]}\n",
"for workspace in workspaces:\n",
" if workspace[\"enabled\"]: print(workspace[\"name\"])\n",
"\n",
"# Select the desired workspace. As a placeholder, I'm simply selecting the first in the list here\n",
"workspace = workspaces[0]"
" print(workspace)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "060092ef",
"metadata": {},
"outputs": [],
"source": [
"# Specify the desired workspace by name from the list printed by the cell above.\n",
"# Ensure that you have the Data Maintainer role or equivalent privileges in the workspace.\n",
"# As a placeholder, the Default workspace will be used.\n",
"workspace = workspaces[\"Default\"]"
]
},
{
Expand Down Expand Up @@ -382,7 +392,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.8.2"
}
},
"nbformat": 4,
Expand Down