Forum Discussion

JayJay11's avatar
JayJay11
Icon for Resolver II rankResolver II
2 years ago
Solved

Dynamic data sources are not supported - What is the workaorund?

Hello all,   I am trying to do the following simple query:     let Source = OData.Feed("https://myredacted-api.s4hana.cloud.sap/sap/opu/odata/sap/API_GLACCOUNTLINEITEM/GLAccountLineItem?$se...
  • miguel's avatar
    2 years ago

    Hi,

    The alternative for your case is to use the root url of your OData service and leverage the query folding capabilities of the service and the connector. In that sense, you won't be passing the vDateFrom as part of the url for the data source (which is the thing thats blocking you at the moment), but rather you can use it as an argument for a filter in your PostingDate column. If you prefer the M code route, it's gonna be like using a Table.SelectRows and passing the vDateFrom as the argument to it.

     

    It is not recommended to pass all the filter arguments to the url. Especially if you know that your data source supports query folding.

     

    You can read more about query evaluation in Power Query using the link below:

    https://learn.microsoft.com/en-us/power-query/query-folding-basics