如何在Power Query自定义连接器中向自定义功能添加文档?

我正在为Power BI构建自定义连接器,我想向自定义函数添加文档。我已经阅读了官方文档和有关此的一些博客文章。我看不出有什么问题。 我尝试过的:

section CustomConnector;

// this the function that gets exposed to the UI
[DataSource.Kind="CustomConnector",Publish="CustomConnector.Publish"]
shared CustomConnector.Contents = () =>
    let
        source = Navigation()
    in
        source;

// This is my navigator
Navigation = () =>
    let
      objects = #table(
       {"Name","Key","Data","ItemKind","ItemName","IsLeaf"},{    
       {"Function1","GetFunction1",GetFunction1(),"Table",true},{"Function2","CustomConnector.Function2",(optional artist_id as text) as table => CustomConnector.Function2(artist_id),"Function",true}}),NavTable = Table.ToNavigationTable(objects,{"Key"},"Name","IsLeaf") 
    in
        NavTable;

// This is an example of the function I want to provide documentation for
GetFunction2 = (optional artist_id) =>   
    let 
       source = "https://www.example.com/",response = Json.Document( Web.Contents ( source,[RelativePath = path & artist_id]) )
    in
       response;

// now the custom type function
GetFunction2Type = type function 
        (             
            optional artist_id as text  
        ) as table meta 
            [
                Documentation.Name = "GetFunction2",Documentation.LongDescription = "This function returns a table with details about the artist.",Documentation.Examples = 
                {
                    [
                        Description = "This function returns a table with details about the artist.",Code = "GetFunction2(6WCWkB4bsGX2HDsoyaQb6KyL)",Result = "Source = #table(
                                                {
                                                  ""something"",""something2""   
                                                },{{},{})"
                    ]
                }
            ];

// This is where I replace the original type for the custom type.
[DataSource.Kind = "CustomConnector"]
shared CustomConnector.GetFunction2 = Value.ReplaceType(GetFunction2,GetFunction2Type);

// and here is my DataSource.Kind record
CustomConnector = [

    TestConnection = (dataSourcePath) => { "CustomConnector.Navigation" },Authentication = [
        OAuth = [
            StartLogin = StartLogin,FinishLogin = FinishLogin,Refresh = Refresh,Logout = Logout
        ]
    ]
];

文档中的重要方面:“与数据源关联的函数必须具有相同的必需函数参数(包括名称,类型和顺序)。特定数据源种类的函数只能使用与该种类相关联的凭据。”。 我想我明白了。 现在,这是在Power BI导航器中的显示方式:

如何在Power Query自定义连接器中向自定义功能添加文档?

这与实现自定义文档功能之前的相同。什么都没发生,并且它正常工作。

有人能发现我犯的错误吗? 谢谢。

h888888575 回答:如何在Power Query自定义连接器中向自定义功能添加文档?

This文章描述了同时反映功能和参数文档的问题。注释中有一个链接,表明这是平台错误。

本文链接:https://www.f2er.com/2948229.html

大家都在问