Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a Odata feed (from Dynamics 365 Finance and Operations) through which I want to fetch the last X orders.
When I fetch the last 9999 orders, it gets fetched quite fast. However, when I want to fetch more than 10k orders, I see (by using Fiddler) that it tries to get ALL orders (in multiple batches of 10k) before it filters out (locally) only the top X orders... This means it wants to fetch millions of records...
Is this normal behaviour?
Thanks,
Koen
Hi @KJanssens ,
What is the kind of way you use to get last N orders , add url parameter in odata feed or use Table.SelectRows() ? Have you used filter step at the next step of Source step?
Please don't have any Confidential Information or Real data in your reply.
Best regards,
@v-lid-msft I made some tests:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderHeaders_table = Source{[Name="SalesOrderHeaders",Signature="table"]}[Data]
in
SalesOrderHeaders_table
Result:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data/SalesOrderHeaders?top=9999", null, [Implementation="2.0"])
in
Source
Result:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data/SalesOrderHeaders?top=9999", null, [Implementation="2.0"]),
#"Kept First Rows" = Table.FirstN(Source,9998)
in
#"Kept First Rows"
Result:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data/SalesOrderHeaders?top=12345", null, [Implementation="2.0"]),
#"Kept First Rows" = Table.FirstN(Source,10001)
in
#"Kept First Rows"
Result:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderHeaders_table = Source{[Name="SalesOrderHeaders",Signature="table"]}[Data],
KeptFirstRows = Table.FirstN(SalesOrderHeaders_table,9999)
in
KeptFirstRows
Result:
let
Source = OData.Feed("https://xxx.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderHeaders_table = Source{[Name="SalesOrderHeaders",Signature="table"]}[Data],
KeptFirstRows = Table.FirstN(SalesOrderHeaders_table,10001)
in
KeptFirstRows
Result:
Note that for all of the above scenarios, the first request of a series of requests is always done twice, and it also (almost always) generates requests "GET /data/$metadata" and "GET /data" which is unnecessary IMHO...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.