Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 32bc6e2

Browse files
committed
updated notebook to avoid issues with angle brakets rendering
1 parent ee00d21 commit 32bc6e2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

‎power-bi.ipynb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
"source": [
4141
"## Get the Dataset id\n",
4242
"\n",
43-
"To discover the Dataset Id that is needed to execute a DAX query using the *executeQuery* endpoint, you can go to your Power BI portal, and click on the Dataset link:\n",
43+
"To discover the Dataset Id that is needed to execute a DAX query using the _executeQuery_ endpoint, you can go to your Power BI portal, and click on the Dataset link:\n",
4444
"\n",
4545
"The Dataset page will open up and the URL will be something like:\n",
4646
"\n",
4747
"```\n",
48-
"https://xyz.powerbi.com/groups/me/datasets/<DATASET_ID>/details\n",
48+
"https://xyz.powerbi.com/groups/me/datasets/DATASET_ID/details\n",
49+
"\n",
4950
"```"
5051
],
5152
"metadata": {
@@ -70,7 +71,7 @@
7071
"eyJ0eXAiOiJK.....5aOYpZSFrSiKYYD6Q\n",
7172
"```\n",
7273
"\n",
73-
"copy the whole string and use in the the following code replacing the \\<TOKEN\\> string after the `Bearer` text. Make sure also to replace the _<DATASET_ID>_ placeholder with the Dataset id you got in the previous step. Execute the T-SQL code. It will safely store the authentication token in a Database Scoped Credential so that it will be possible to use the token later with `sp_invoke_external_rest_endpoint`"
74+
"copy the whole string and use in the the following code replacing the `TOKEN` string after the `Bearer` text. Make sure also to replace the `DATASET_ID` placeholder with the Dataset id you got in the previous step. Execute the T-SQL code. It will safely store the authentication token in a Database Scoped Credential so that it will be possible to use the token later with `sp_invoke_external_rest_endpoint`"
7475
],
7576
"metadata": {
7677
"azdata_cell_guid": "6cf54ac8-0e87-4698-84a6-ae9b81934b5a"
@@ -86,11 +87,11 @@
8687
"end\n",
8788
"\n",
8889
"-- create database scoped credential\n",
89-
"if exists(select * from sys.database_scoped_credentials where [name] = 'https://api.powerbi.com/v1.0/myorg/datasets/<DATASET_ID>/executeQueries') begin\n",
90-
" drop database scoped credential [https://api.powerbi.com/v1.0/myorg/datasets/<DATASET_ID>/executeQueries];\n",
90+
"if exists(select * from sys.database_scoped_credentials where [name] = 'https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/executeQueries') begin\n",
91+
" drop database scoped credential [https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/executeQueries];\n",
9192
"end\n",
92-
"create database scoped credential [https://api.powerbi.com/v1.0/myorg/datasets/<DATASET_ID>/executeQueries]\n",
93-
"with identity = 'HTTPEndpointHeaders', secret = '{\"Authorization\": \"Bearer <TOKEN>\"}';\n",
93+
"create database scoped credential [https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/executeQueries]\n",
94+
"with identity = 'HTTPEndpointHeaders', secret = '{\"Authorization\": \"Bearer TOKEN\"}';\n",
9495
"go"
9596
],
9697
"metadata": {
@@ -118,7 +119,7 @@
118119
"cell_type": "code",
119120
"source": [
120121
"\n",
121-
"declare @url nvarchar(4000) = N'https://api.powerbi.com/v1.0/myorg/datasets/<DATASET_ID>/executeQueries';\n",
122+
"declare @url nvarchar(4000) = N'https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/executeQueries';\n",
122123
"declare @payload nvarchar(max) = N'{\n",
123124
" \"queries\": [\n",
124125
" {\n",
@@ -148,7 +149,7 @@
148149
"\t@method = 'POST',\n",
149150
"\t@url = @url,\n",
150151
"\t@payload = @payload,\n",
151-
"\t@credential = [https://api.powerbi.com/v1.0/myorg/datasets/<DATASET_ID>/executeQueries],\n",
152+
"\t@credential = [https://api.powerbi.com/v1.0/myorg/datasets/DATASET_ID/executeQueries],\n",
152153
"\t@response = @response output;\n",
153154
"\n",
154155
"select * from openjson(@response, '$.result.results[0].tables[0].rows') with\n",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /