Exam QSDA2024 Topic 4 Question 34 Discussion

Actual exam question for Qlik's QSDA2024 exam
Question #: 34
Topic #: 4
A data architect needs to load Table_A from an Excel file and sort the data by Reld_2.
Which script should the data architect use?

Suggested Answer: A Vote an answer

In this scenario, the data architect needs to load Table_A from an Excel file and ensure that the data is sorted by Field_2. The key here is to correctly load and sort the data in the script.
Understanding the Options:
* Option A:
* First, it loads the data into a temporary table (Temp) from the Excel file.
* Then, it loads the data from the temporary table (Temp) into Table_A, using the ORDER BY Field_2 ASC clause to sort the data by Field_2.
* Finally, it drops the temporary table (Temp), leaving the sorted data in Table_A.
* Option B:
* Directly loads the data from the Excel file into Table_A and applies the ORDER BY Field_2 ASC clause in the same step.
* However, the ORDER BY clause in a direct load from an external source like Excel might not work as expected because Qlik Sense does not support ORDER BY when loading directly from a file.
* Option C:
* Similar to Option A but uses the NoConcatenate keyword to prevent concatenation, which is unnecessary since Temp and Table_A have different names.
* While this script works, the NoConcatenate keyword is redundant in this context.
* Option D:
* The ORDER BY Field_2 ASC is placed before the LOAD statement, which is not a correct usage in Qlik Sense script syntax.
Correct Script Choice:
* Option Ais the correct script because it correctly sorts the data after loading it into a temporary table and then loads the sorted data into Table_A. This method ensures that the data is sorted by Field_2 and avoids any issues related to sorting during the initial data load.
References:
* Qlik Sense Scripting Best Practices: When sorting data in Qlik Sense, the correct approach is to use a RESIDENT LOAD with an ORDER BY clause after loading the data into a temporary table.

by Erica at Dec 02, 2024, 07:55 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어