Deciding When to Use the getResultSet API Instead of getMembers API

Objective

After completing this lesson, you will be able to decide when to use the getResultSet API instead of the getMembers API in a story script.

getResultSet API and getMembers API

In this lesson, we will explore reading dimension members and explain why it’s best practice to use the getResultSet API instead of the getMembers API. However, we will also look at a scenario when it might be better to use the getMembers API for better script performance.

Summary

With any story, performance can vary depending on how the story is set up, how the scripts are written, and the data connections that are used. Performance depends on not only the scenario but also how the script is built. Script processing is related to frontend time, so it may be slower, or even faster, depending on the user’s machine.

It’s generally true that the getResultSet API in a script is faster than the getMembers API as it does not require an extra round trip to the backend server. However, depending on the size of the results, it can take longer to loop over it and find the values you need instead of using a separate backend request that directly delivers the data you require.

Log in to track your progress & complete quizzes