microsoft/vscode-powerquery-sdk

OData.Feed failed to convert literal to EdmDateTimeOffset

AhambaliJ opened this issue · 1 comments

Preflight Checklist

Power Query SDK

0.2.3

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

Windows_NT 10.0.19045

VSCode version

No response

PQSdkTool Path

No response

Bug Description

When pulling data using OData.Feed, the custom connector fails to convert literal '2022-08-11T00:00:00.0000000' to expected type "Edm.DateTimeOffset".

Sample code for the OData.Feed are as such:
TrainingCore = OData.Feed("url",[#"Authorization" = authToken,#"Prefer" ="odata.maxpagesize=1000000"],null),

Steps to Reproduce

1.Call OData.Feed containing field with type of 'Edm.DateTimeOffset' and string value of format '2022-08-11T00:00:00.0000000'
2.Publish the custom connector
3.Use the connector in PowerBI
4.Results

Actual Experience

After publishing the custom connector and placing the mez file to the custom connector folder, I used the connector to get data from my data source and was met with the error below:

image

Expected Experience

No response

Additional Context

No response

OData.Feed has two implementations internally.
You can use the [Implementation = "2.0"] option to use the latest stack. You'll likely find better compatibility with this stack.

OData.Feed("url", [#"Authorization" = authToken,#"Prefer" ="odata.maxpagesize=1000000"], [Implementation = "2.0"]),