Skip to content

Commit bc07e99

Browse files
Merge pull request #1419 from MicrosoftDocs/main
Auto Publish – main to live - 2025-11-26 22:00 UTC
2 parents 374d779 + 667fc73 commit bc07e99

File tree

8 files changed

+255
-295
lines changed

8 files changed

+255
-295
lines changed

powerquery-docs/samples/trippin/2-rest/readme.md

Lines changed: 35 additions & 37 deletions
Large diffs are not rendered by default.

powerquery-docs/samples/trippin/3-navtables/readme.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: TripPin 3 - Navigation Tables
33
description: Adding navigation tables to the TripPin REST connector.
44
author: ptyx507x
55
ms.topic: tutorial
6-
ms.date: 5/16/2024
6+
ms.date: 11/25/2025
77
ms.author: miescobar
88
ms.subservice: custom-connectors
99
---
@@ -12,19 +12,19 @@ ms.subservice: custom-connectors
1212

1313
This multi-part tutorial covers the creation of a new data source extension for Power Query. The tutorial is meant to be done sequentially—each lesson builds on the connector created in previous lessons, incrementally adding new capabilities to your connector.
1414

15-
In this lesson, you will:
15+
In this lesson, you:
1616

1717
> [!div class="checklist"]
1818
> * Create a navigation table for a fixed set of queries
1919
> * Test the navigation table in Power BI Desktop
2020
21-
This lesson adds a navigation table to the TripPin connector created in the [previous lesson](../2-rest/readme.md). When your connector used the `OData.Feed` function ([Part 1](../1-odata/readme.md)), you received the navigation table for free”, as derived from the OData service’s $metadata document. When you moved to the `Web.Contents` function ([Part 2](../2-rest/readme.md)), you lost the built-in navigation table. In this lesson, you take a set of fixed queries you created in Power BI Desktop and add the appropriate metadata for Power Query to popup the **Navigator** dialog for your data source function.
21+
This lesson adds a navigation table to the TripPin connector created in the [previous lesson](../2-rest/readme.md). When your connector used the `OData.Feed` function ([Part 1](../1-odata/readme.md)), you received the navigation table "for free," as derived from the OData service’s $metadata document. When you moved to the `Web.Contents` function ([Part 2](../2-rest/readme.md)), you lost the built-in navigation table. In this lesson, you take a set of fixed queries you created in Power BI Desktop and add the appropriate metadata for Power Query to popup the **Navigator** dialog for your data source function.
2222

23-
See the [Navigation Table documentation](../../../handling-navigation-tables.md) for more information about using navigation tables.
23+
Go to the [Navigation Table documentation](../../../handling-navigation-tables.md) for more information about using navigation tables.
2424

2525
## Defining fixed queries in the connector
2626

27-
A simple connector for a REST API can be thought of as a fixed set of queries, each returning a table. These tables are made discoverable through the connectors navigation table. Essentially, each item in the navigator is associated with a specific URL and set of transformations.
27+
A simple connector for a REST API can be thought of as a fixed set of queries, each returning a table. These tables are made discoverable through the connector's navigation table. Essentially, each item in the navigator is associated with a specific URL and set of transformations.
2828

2929
You start by copying the queries you wrote in Power BI Desktop (in the previous lesson) into your connector file. Open the TripPin project in Visual Studio Code, and paste the Airlines and Airports queries into the TripPin.pq file. You can then turn those queries into functions that take a single text parameter:
3030

@@ -56,7 +56,7 @@ GetAirportsTable = (url as text) as table =>
5656
#"Changed Type";
5757
```
5858

59-
Next you'll import the mock navigation table query you wrote that creates a fixed table linking to these data set queries. Call it `TripPinNavTable`:
59+
Next you need to import the mock navigation table query you wrote that creates a fixed table linking to these data set queries. Call it `TripPinNavTable`:
6060

6161
```powerquery-m
6262
TripPinNavTable = (url as text) as table =>
@@ -80,15 +80,15 @@ shared TripPin.Contents = Value.ReplaceType(TripPinNavTable, type function (url
8080
```
8181

8282
> [!NOTE]
83-
> Your extension can mark multiple functions as `shared`, with or without associating them with a `DataSource.Kind`. However, when you associate a function with a specific `DataSource.Kind`, each function **must** have the same set of *required* parameters, with the same name and type. This is because the data source function parameters are combined to make a 'key' used for looking up cached credentials.
83+
> Your extension can mark multiple functions as `shared`, with or without associating them with a `DataSource.Kind`. However, when you associate a function with a specific `DataSource.Kind`, each function **must** have the same set of *required* parameters, with the same name and type. This requirement exists because the data source function parameters are combined to make a 'key' used for looking up cached credentials.
8484
8585
Build your connector after finalizing all the changes and test your `TripPin.Contents` function using the TripPin.query.pq file. You can continue to use the previously created credential or you can set a new one and then evaluate your current Power Query file.
8686

8787
```powerquery-m
8888
TripPin.Contents("https://services.odata.org/v4/TripPinService/")
8989
```
9090

91-
![TripPin Table.](../../media/trippin3-table.png)
91+
:::image type="content" source="../../media/trippin3-table.png" alt-text="Screenshot of the PQTest result with the output of the modified connector.":::
9292

9393
## Creating a navigation table
9494

@@ -109,22 +109,23 @@ TripPinNavTable = (url as text) as table =>
109109
```
110110

111111
Running your test query again, after building your connector again, gives you a similar result as last time—with a few more columns added.
112-
![TripPin Table2.](../../media/trippin3-table2.png)
112+
113+
:::image type="content" source="../../media/trippin3-table2.png" alt-text="Screenshot of the PQTest result with the output containing a number of new rows.":::
113114

114115
> [!NOTE]
115116
> You don't see the **Navigator** window appear in the PQTest result window of Visual Studio Code. The **M Query Output** window always displays the underlying table.
116117
117118
If you copy your extension over to your Power BI Desktop custom connector and invoke the new function from the **Get Data** dialog, your navigator appears.
118119

119-
![TripPin Navigator.](../../media/trippin3-nav.png)
120+
:::image type="content" source="../../media/trippin3-nav.png" alt-text="Screenshot of the Navigator dialog with the results of the new function displayed.":::
120121

121-
If you right select on the root of the navigation tree and select **Edit**, you see the same table as you did within Visual Studio.
122+
If you right select the root of the navigation tree and select **Edit**, the same table as appeared in Visual Studio is displayed.
122123

123-
![TripPin Query.](../../media/trippin3-query.png)
124+
:::image type="content" source="../../media/trippin3-query.png" alt-text="Screenshot of the Power Query editor displaying the same table as in the previous PQTest result.":::
124125

125126
## Conclusion
126127

127-
In this tutorial, you added a [Navigation Table](../../../handlingnavigationtables.md) to your extension. Navigation Tables are a key feature that makes connectors easier to use. In this example your navigation table only has a single level, but the Power Query UI supports displaying navigation tables that have multiple dimensions (even when they're ragged).
128+
In this tutorial, you added a [Navigation Table](../../../handlingnavigationtables.md) to your extension. Navigation Tables is a key feature that makes connectors easier to use. In this example, your navigation table only has a single level, but the Power Query UI supports displaying navigation tables that have multiple dimensions (even when they're ragged).
128129

129130
## Next steps
130131

0 commit comments

Comments
 (0)