Data Factory OData query - Object reference not set to an instance of an object RRS feed

  • Question

  • Source: Dynamics CRM Online via OData connector, Sink: Azure blob storage, I'm using Web API.

    https://[Organisation URL]/api/data/v8.1/

    My source dataset is an OData entity with following typeProperty

    "typeProperties": {
                "path": "EntityDefinitions"

    My sink dataset is a blobstorage

    "typeProperties": {
                "folderPath": "myfolder",
                "format": {
                    "type": "JsonFormat",
                    "filePattern": "setOfObjects",
                    "encodingName": "UTF-8"

    In the data factory pipeline

    "typeProperties": {
                        "source": {
                            "type": "RelationalSource"

    All works well and I get the data out. However if I add a query e.g.

    "typeProperties": {
                        "source": {
                            "type": "RelationalSource",
                            "query": "?$select=MetadataId"

    I get following error. Any help around this please?

    Also tried "query": "$$Text.Format('?$select=MetadataId')"

    Mashup operation failed at Source side. Error message from Mashup execution : ErrorCode=FailedMashupOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException, Message='Type=Microsoft.Data.Mashup.InternalMashupException, Message=We're sorry, an error occurred during evaluation., Source=Microsoft.Data.Mashup,''Type=Microsoft.Mashup.Evaluator.Interface.ErrorException, Message=Object reference not set to an instance of an object


    Thursday, November 17, 2016 5:16 PM

All replies

  • Hi Subash,

    The query format looks good.

    We doubt there's something unexpected with OData feed. Could you try the same OData source in Power Query or PBIDesktop, which will give more detail stack traces for further troubleshooting?

    Friday, November 18, 2016 5:25 AM
  • I have tried using Power Query - selecting removing and expanding columns all works fine for that OData source.

    In Data Factory as well, I'm able to connect the OData source and extract "all the columns" for an entity no problem in that.

    But as soon as I add "query" property in the "typeProperties" section then I end up in this error. If I remove the "query" property it all works fine.



    Friday, November 18, 2016 9:35 AM