Question 831 of 966
Prepare the datamediumMultiple SelectObjective-mapped

Quick Answer

The answer is to use the 'Table.GenerateByPage' function or write a recursive M function that manually loops through the API responses. Both methods are correct because REST APIs using a 'nextPageToken' require custom pagination logic—Power Query’s built-in pagination detection cannot automatically follow dynamic tokens embedded in JSON. On the PL-300 exam, this tests your ability to handle non-standard pagination patterns, often appearing as a scenario where you must extract a token from each response and feed it into the next request until the token is null. A common trap is assuming Power Query’s native "Relative Path" or "Next Link" detection will work, but those only handle URL-based pagination, not token-based. For the exam, remember: if the API returns a token inside the JSON body, you must write M code—either via Table.GenerateByPage for cleaner iteration or a recursive function for explicit control. Memory tip: "Token in JSON? Write the function yourself."

PL-300 Prepare the data Practice Question

This PL-300 practice question tests your understanding of prepare the data. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are preparing data from a REST API that returns JSON. The API has a pagination mechanism using a 'nextPageToken' in the response. You need to ingest all data into Power BI. Which TWO methods can you use to handle pagination in Power Query?

Question 1mediummulti select
Read the full NAT/PAT explanation →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Write a recursive M function that calls Web.Contents and follows the next page token.

Option D is correct because you can write a recursive M function that repeatedly calls Web.Contents, extracts the 'nextPageToken' from each JSON response, and constructs the next request URL until no token is returned. This approach gives you full control over the pagination logic, which is necessary when the API does not support Power Query's built-in pagination detection.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Enable automatic pagination detection in Power Query.

    Why it's wrong here

    Automatic pagination detection is not available for custom REST APIs; it works only for specific connectors.

  • Configure incremental refresh to load data in batches.

    Why it's wrong here

    Incremental refresh is for partitioning data by time, not for handling API pagination.

  • Use DirectQuery to connect to the API and rely on the server to paginate.

    Why it's wrong here

    DirectQuery is not supported for REST APIs; it is for databases.

  • Write a recursive M function that calls Web.Contents and follows the next page token.

    Why this is correct

    This is a common pattern to manually implement pagination in Power Query.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use the 'Table.GenerateByPage' function in Power Query M.

    Why this is correct

    This function allows you to create a custom pagination loop that fetches pages until a stop condition is met.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume Power Query can automatically paginate any REST API (Option A) or that incremental refresh (Option B) can solve pagination, when in reality both require specific API patterns or data modeling features that do not apply to custom token-based pagination.

Detailed technical explanation

How to think about this question

The recursive M function pattern typically uses a custom function that calls Web.Contents, parses the JSON with Json.Document, extracts the data rows, checks for the 'nextPageToken', and if present, calls itself with the updated token parameter. A real-world scenario is when the API returns a token that must be included in the next request's query string or header, requiring dynamic URL construction. Power Query's built-in Table.GenerateByPage function (Option E) is a more structured alternative that uses a generator pattern to iterate over pages without explicit recursion, making it easier to handle errors or stop conditions.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PL-300 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PL-300 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PL-300 question test?

Prepare the data — This question tests Prepare the data — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Write a recursive M function that calls Web.Contents and follows the next page token. — Option D is correct because you can write a recursive M function that repeatedly calls Web.Contents, extracts the 'nextPageToken' from each JSON response, and constructs the next request URL until no token is returned. This approach gives you full control over the pagination logic, which is necessary when the API does not support Power Query's built-in pagination detection.

What should I do if I get this PL-300 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.