Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LukasThiago
Frequent Visitor

How do I change the name of the navigation table folder?

Hi, I'm developing a custom connector and I have a function with 2 parameters, the access token and the list of the tables.

LukasThiago_0-1694718112494.png


But in the navigation table, the name of the "folder" is the access token, and I need to change, but I don't know how. Someone can help me?

LukasThiago_1-1694718234595.png

 

5 REPLIES 5
v-shex-msft
Community Support
Community Support

HI @LukasThiago,

Can you please share some more detail about these connector definitions? How you check the variable and function with named/defined with 'token'?

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Sure, this is basically the main part of my code

[DataSource.Kind="BaseB", Publish="BaseB.Publish"]
shared BaseBNavTable = Value.ReplaceType(NavTable, BaseBType);

BaseBType = type function (
    token as (type text meta [
        DataSource.Path = false,
        Documentation.FieldCaption = "Token",
        Documentation.SampleValues = {"zu1UBNRAn1a..."}
    ]),
    tables as (type list meta [
        Documentation.FieldCaption = "Tables",
        Documentation.AllowedValues = RootEntities
    ])
) as text meta [
    Documentation.Name = "Base-B"
];

NavTable = (token as text, tables as list) as table =>
    let
        entitiesAsTable = Table.FromList(tables, Splitter.SplitByNothing()),
        rename = Table.RenameColumns(entitiesAsTable, {{"Column1", "Name"}}),
        withData = Table.AddColumn(rename, "Data", each BaseB.Feed(Uri.Combine(BaseUrl, [Name]), token), Uri.Type),
        navTable = Table.ToNavigationTable(withData, {"Name"}, "Name", "Data")
    in
        navTable;

BaseB.Feed = (url as text, token as text) =>
    let
        header = [
            Authorization = "Bearer " & token
        ],
        result = getData(url, header, 20000, 0)
    in
        result;

HI @LukasThiago,

I think you should modify the 'Documentation.FieldCaption' and 'Documentation.SampleValues' parts which used to define the 'token' option of your data connector.

[DataSource.Kind="BaseB", Publish="BaseB.Publish"]
shared BaseBNavTable = Value.ReplaceType(NavTable, BaseBType);

BaseBType = type function (
    token as (type text meta [
        DataSource.Path = false,
        Documentation.FieldCaption = "FolderPath",
        Documentation.SampleValues = {"x:\..."}
    ]),
    tables as (type list meta [
        Documentation.FieldCaption = "Tables",
        Documentation.AllowedValues = RootEntities
    ])
) as text meta [
    Documentation.Name = "Base-B"
];

NavTable = (token as text, tables as list) as table =>
    let
        entitiesAsTable = Table.FromList(tables, Splitter.SplitByNothing()),
        rename = Table.RenameColumns(entitiesAsTable, {{"Column1", "Name"}}),
        withData = Table.AddColumn(rename, "Data", each BaseB.Feed(Uri.Combine(BaseUrl, [Name]), token), Uri.Type),
        navTable = Table.ToNavigationTable(withData, {"Name"}, "Name", "Data")
    in
        navTable;

BaseB.Feed = (url as text, token as text) =>
    let
        header = [
            Authorization = "Bearer " & token
        ],
        result = getData(url, header, 20000, 0)
    in
        result;

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,
This method doesn't worked, the folder name doesn't change, untill is the same. I think there is no way to change the folder name.

Hi @LukasThiago,

This part should be the definition property of the token and same as the snapshots displayed.  Have you fully clear up the old version cache data and release the new version connectors?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.