DataConnectors
DataConnectors copied to clipboard
On premises Data Gateway Data Source, for optional parameters does not work
Hi,
I am trying to use On - premises Data Gateway with my Custom connector, I added Test Connection section in my code:
DemoProject= [TestConnection = (dataSourcePath) => let json = Json.Document(dataSourcePath), parameter1 = json[parameter1], parameter2 = json[parameter2], parameter3 = json[parameter3] in { "DemoProject.Contents", parameter1, parameter2, parameter3}, Authentication = [ UsernamePassword = [ UsernameLabel = "Username", PasswordLabel = "Password", Label = "DemoProjectCredentials" ] ], Label = "DemoProject API" ];
My DemoProject.Contents looks like :
[DataSource.Kind="DemoProject", Publish="DemoProject.Publish"] shared DemoProject.Contents = Value.ReplaceType(DemoProjectImpl, DemoProjectType);
DemoProjectType = type function ( parameter1 as (type text meta [ DataSource.Path = false, Documentation.FieldDescription = "Defines parameter1" ]), parameter2 as (type text meta [ Documentation.FieldDescription = "Defines parameter2" ]), optional parameter3 as (type text meta [ Documentation.FieldDescription = "Defines parameter3." ])) as table meta [ Documentation.Name = "DemoProject" ];
DemoProjectImpl = (parameter1 as text, parameter2 as text, optional parameter3 as text) => let NavigationTables = DemoProjectNavTableQueryFolding(parameter1, parameter2, parameter3) in NavigationTables;
When I remove word optional for last parameter and remove DataSource.Path = false, I get
When one of this options or both are in place, I get
And also in in Gateway logs there is:
GatewayPipelineErrorCode=DM_GWPipeline_UnknownError
GatewayVersion=
InnerType=ValueException
InnerMessage=
Any ideas why it happens? @CurtHagenlocher @cwebbbi @fmms
Thanks a lot