exam questions

Exam PL-300 All Questions

View all questions & answers for the PL-300 exam

Exam PL-300 topic 1 question 6 discussion

Actual exam question from Microsoft's PL-300
Question #: 6
Topic #: 1
[All PL-300 Questions]

DRAG DROP -
In Power Query Editor, you have three queries named ProductCategory, ProductSubCategory, and Product.
Every Product has a ProductSubCategory.
Not every ProductsubCategory has a parent ProductCategory.
You need to merge the three queries into a single query. The solution must ensure the best performance in Power Query.
How should you merge the tables? To answer, drag the appropriate merge types to the correct queries. Each merge type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Inner -
Every Product has a ProductSubCategory.
A standard join is needed.
One of the join kinds available in the Merge dialog box in Power Query is an inner join, which brings in only matching rows from both the left and right tables.

Box 2: Left outer -
Not every ProductsubCategory has a parent ProductCategory.
One of the join kinds available in the Merge dialog box in Power Query is a left outer join, which keeps all the rows from the left table and brings in any matching rows from the right table.
Reference:
https://docs.microsoft.com/en-us/power-query/merge-queries-inner https://docs.microsoft.com/en-us/power-query/merge-queries-left-outer

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
learnazureportal
Highly Voted 2 years, 7 months ago
Answer is correct
upvoted 50 times
...
fred92
Highly Voted 2 years, 6 months ago
Answer is correct: 1. Inner join, 2. Left outer join If each row in table A has a matching row in table B, always use inner join because it has the best performance.
upvoted 37 times
NevilleV
2 years, 6 months ago
Question 1. You in all likelihood have to say 10 products each with a parent category, But your subcategories are eg 3 because product 1, 2 and 3 are subcategory socks, product 4, 5 and 6 are subcategory shoes and 7, 8 and 9 are shirts. Sure every Product has a SubCategory but they aren't duplicates. I think the answer to Question 1 is Left Outer. Question 2 is also Left outer
upvoted 7 times
fred92
2 years, 6 months ago
When you join tables (inner join) you'll get all rows from T1 and all rows from T2 that meet the join and where conditions. It is not relevant if the cardinality is 1 or many on one or both sides. In your example the result would be: product 1 - socks product 2 - socks product 3 - socks product 4 - shoes product 5 - shoes ... and so on
upvoted 3 times
...
...
...
Ash_34
Most Recent 8 months, 1 week ago
Answer is correct: 1. Inner Join - Because both table have matching rows 2. Left Outer - We can get all the matching and unmatching records from left table
upvoted 2 times
...
rcaliandro
8 months, 2 weeks ago
The answer is correct: we need first an INNER JOIN between product and productSubcategory (in this way we will optimize since every product has a product subcategory) and we also need a left outer join between subcategory and category (left because not every product subcategory has a product category)
upvoted 1 times
...
powerbot9000
1 year, 3 months ago
My biggest challenge with this specific question is paying attention the the clearly labeled headers vs. ignoring the order in which the tables were stated within the question itself.
upvoted 1 times
...
natattack
1 year, 4 months ago
How are you supposed to know that you shouldnt conserve all table information?
upvoted 4 times
...
mustafadev
1 year, 5 months ago
How you get product attribute from D option? is there right information you have in 2nd table regarding product?
upvoted 1 times
...
TrustMyAnswers
1 year, 5 months ago
Answer is correct. 1. Inner Join 2. Left Outer Join
upvoted 1 times
...
marcolapo92
1 year, 7 months ago
A. Inner Join because we have only one row in Product for each ProductSubCategory. B. Left Join because we do not need rows from ProductCategory which do not match any ProductSubCategory
upvoted 7 times
...
Pocu
1 year, 7 months ago
1: either Left outer or inner (same results) 2: left outer To fully understand this question, there are a few points: (1) Which to keep and which can be ignored. At the end of the day, we need to analyze the sales so all products need to be kept but unused subcategory and category can be ignored. (2) best performance : according to point1, we keep all products and ignore unused subcategories and categories. If it doesn't mention "best performance" and we want to keep all the subcategories and categories( which might be the case in real world cases),we can do full outer join on 3 tables. (3) left outer vs inner in question 1: As "Every Product has a ProductSubCategory", Let's say if there are subcategory 1,2,3 in product query and 1,2,3,4 in ProductSubCategory table, either left outer or inner join results in 1,2,3. (4) Let's say we have SubCategory 1,2 and we have Categories Sport,Drinks. SubCategory 1 is under Category Sport but Subcategory 2 is not under any Category. As we need to keep SubCategory 1,2, we need to do a Left outer join. If we keep Category Drinks then it defeats the purpose of "Best performance".
upvoted 5 times
...
Igetmyrole
1 year, 7 months ago
* The correct answer for the first option is Inner Join: it is because we want to keep only the rows where there's matching ProductSubCategory for each Product. * The correct answer for the second option is Left outer join: it is because not every ProductSubCategory has a parent ProductCategor, so we want to keep all ProductSubCategories while matching them with any available ProductCategories.
upvoted 5 times
...
zdgjn
1 year, 8 months ago
If I am building something from the client why would I take risk of missing out data from ProdSubCategory table in the Event say a new item in any table not present in other comes in? Answer is not practical for "Inner Join"
upvoted 2 times
...
zdgjn
1 year, 8 months ago
Please can somebody share source where it states Inner join better than Left join?
upvoted 3 times
...
JJMC5544
1 year, 10 months ago
When Product and ProductSubCategory are merged, it will be still named as Product table. So second line should show Product, instead of ProductSubCategory. So confusing.
upvoted 3 times
...
DUVANES
2 years, 1 month ago
1. Inner 2. Left Outer
upvoted 1 times
...
Shastrimath
2 years, 1 month ago
Answer is correct
upvoted 1 times
...
srikanth923
2 years, 1 month ago
Answer: - Inner join is the best option if you only want the matching rows from both tables. - Left outer join is useful if you want all the records from one of the tables. In this scenario, we want all the records from the "product subcategory" table, so we should use a left outer join.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago