Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 1 question 2 discussion

Actual exam question from Microsoft's DP-203
Question #: 2
Topic #: 1
[All DP-203 Questions]

You have an Azure Synapse workspace named MyWorkspace that contains an Apache Spark database named mytestdb.
You run the following command in an Azure Synapse Analytics Spark pool in MyWorkspace.
CREATE TABLE mytestdb.myParquetTable(
EmployeeID int,
EmployeeName string,
EmployeeStartDate date)

USING Parquet -
You then use Spark to insert a row into mytestdb.myParquetTable. The row contains the following data.

One minute later, you execute the following query from a serverless SQL pool in MyWorkspace.

SELECT EmployeeID -
FROM mytestdb.dbo.myParquetTable
WHERE EmployeeName = 'Alice';
What will be returned by the query?

  • A. 24
  • B. an error
  • C. a null value
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
gerrie1979
Highly Voted 2 years ago
I did a test, waited for one minute and tried the query in a serverless sql pool and received 24 as the result, so I don't understand that B has been voted so much because the answer is A) 24 without a doubt
upvoted 58 times
cecbc1f
8 months, 4 weeks ago
i test too and confirm that the right answer is A
upvoted 3 times
...
Did you tried the same query that is presented here? with "mytestdb.dbo.myParquetTable"??
upvoted 4 times
yogiazaad
1 year, 9 months ago
The table and Column names are case insensitive.
upvoted 3 times
...
Virul
1 year, 9 months ago
I tried with all upper case, and it still return record for name Alice. Answer is A
upvoted 6 times
...
...
...
dmitriypo
Highly Voted 2 years, 1 month ago
Answer is B, but not because of the lowercase. The case has nothing to do with the error. If you look attentively, you will notice that we create table mytestdb.myParquetTable, but the select statement contains the reference to table mytestdb.dbo.myParquetTable (!!! - dbo). Here is the error message I got: Error: spark_catalog requires a single-part namespace, but got [mytestdb, dbo].
upvoted 56 times
psicktrick
1 year, 10 months ago
But if you look at the docs, that's exactly what has been done https://learn.microsoft.com/en-us/azure/synapse-analytics/metadata/table#expose-a-spark-table-in-sql:~:text=mytestdb.myparquettable%22)%3B-,Now%20you%20can%20read%20the%20data%20from%20your%20serverless%20SQL%20pool%20as%20follows%3A,-SQL
upvoted 20 times
Bedmed
2 months, 4 weeks ago
NO The Create table is in Azure Synapse Analytics Spark pool and select is in the serverless
upvoted 4 times
...
ck8.kakade
3 months, 4 weeks ago
Yes, so the right answer if A. It will return an output without any errors
upvoted 2 times
...
goldy29
1 year, 4 months ago
Thanks @psicktrick for the link
upvoted 4 times
...
...
devnginx
1 year ago
i think B option is the correct too
upvoted 1 times
...
Shaik_Shahul
1 year, 1 month ago
i think you don't about sql server bro, Dbo means database object so it is not a issue for this the correct answer is A
upvoted 6 times
__Tom
7 months, 3 weeks ago
Dbo means database owner actually bro
upvoted 2 times
...
...
SenMia
11 months, 1 week ago
kindly clarify, which can be the right option? the conversations are confusing. :( any explanations are appreciated. thank you!!
upvoted 2 times
...
...
Anithec0der
Most Recent 3 days, 23 hours ago
Option A: dbo is the default schema where the object gets created in synapse if not specified explicitly.
upvoted 1 times
...
BrilliantBeast
1 week, 3 days ago
Does the order of insertion doesn't matter here? As the column order is different in the table than the one used in insertion.
upvoted 1 times
...
examdemo
1 month, 3 weeks ago
24 is correct answer Link : https://learn.microsoft.com/en-us/azure/synapse-analytics/metadata/table#create-a-managed-table-in-spark-and-query-from-serverless-sql-pool
upvoted 1 times
...
esaade
2 months ago
As per ChatGPT, The query will fail with an error message as the table myParquetTable is created using Spark and the USING Parquet option, which means it is stored in a Parquet file format. Serverless SQL pool does not support querying Parquet files directly, so it cannot query myParquetTable in its current form. To make the table accessible from the serverless SQL pool, you need to create an external table that references the Parquet file. Then, you can query the external table instead. Assuming you have created an external table named myExternalParquetTable that references the Parquet file containing the data in myParquetTable, the query to select EmployeeID where EmployeeName is 'Alice' would be: SELECT EmployeeID FROM myExternalParquetTable WHERE EmployeeName = 'Alice';
upvoted 6 times
...
milad2021
2 months ago
Selected Answer: B
The query will fail with an error because mytestdb.myParquetTable is a Spark table, not a SQL table. When you created the table using Spark, you used the Spark SQL syntax, and the table is stored in the Spark engine's metadata. Serverless SQL pool in Azure Synapse Analytics cannot directly query Spark tables; it can only query SQL tables. If you want to query the data stored in the mytestdb.myParquetTable table using a serverless SQL pool, you need to create an external table that maps to the same Parquet file. You can do this by using the CREATE EXTERNAL TABLE statement in a SQL pool.
upvoted 3 times
AlejandroU
1 year, 1 month ago
or as "Managed table". The answer seems to be very similar to the section "Create a managed table in Spark and query from serverless SQL pool" in the link below: https://learn.microsoft.com/en-us/azure/synapse-analytics/metadata/table#expose-a-spark-table-in-sql
upvoted 2 times
...
...
Katiane
2 months ago
Right answer is B. The query must run into Serverless SQL poll, not into Apache spark. "One minute later, you execute the following query from a serverless SQL pool in MyWorkspace." If we run that query into apache spark pool, using notebook for example, we must use "SELECT database.table". So, according the question, we must use serverless sql pool and, cause of that, we have to use "SELECT database.dbo.table" OR "use database; select table"
upvoted 1 times
...
jhargett1
2 months ago
The given query is trying to select the EmployeeID from the Parquet table myParquetTable in the mytestdb database, where the EmployeeName is 'Alice'. However, it seems like there's a minor typo in the query. The query should be like this: SELECT EmployeeID FROM mytestdb.myParquetTable WHERE EmployeeName = 'Alice'; The given query is trying to select the EmployeeID from the Parquet table myParquetTable in the mytestdb database, where the EmployeeName is 'Alice'. However, it seems like there's a minor typo in the query. The query should be like this: sql Copy code SELECT EmployeeID FROM mytestdb.myParquetTable WHERE EmployeeName = 'Alice'; The corrected query would return: A. 24 So, the correct answer is A. The query will return the EmployeeID, which is 24.
upvoted 3 times
...
8ac3742
2 months, 1 week ago
The question is bad, the Spark database table created VIA Spark pool is not automatically generated in the SQL pool, the user should create one external table via serverless SQL pool first, the schema is not required in the external table. So whether schema dbo is needed in the 2nd query is depending on if dbo is included when creating external table.
upvoted 1 times
...
renan_ineu
2 months, 2 weeks ago
The question is to query from Serverless to Spark. To query directly in Spark, must not use "dbo". To query from Serverless, "dbo" is required. I tested this myself just now. Correct: A.
upvoted 1 times
...
a85becd
2 months, 3 weeks ago
Selected Answer: A
Answer A is correct based on logic once you create a table in Spark DB it will automatically Create it under db.table for serverless so query returns the result
upvoted 2 times
...
NAWRESS96
3 months, 1 week ago
Selected Answer: A
the right answer is A
upvoted 3 times
...
a85becd
3 months, 2 weeks ago
Answer is A, because after Create a table in Spark pool the same one will be automatically created under dbo for Serverless SQL Pool. so the query returns 24
upvoted 2 times
...
207680a
3 months, 4 weeks ago
Answer A , You have inserted one row and the ID is 24 , The select query is correct so B is wrong and there is no Null value in the inserted records
upvoted 1 times
...
UdayKaudgaonkar
3 months, 4 weeks ago
Selected Answer: A
Learning, unsure about answer first but after checking document, can confirm it's A. Question is nearly same example as of doc.
upvoted 3 times
...
rajasuman
4 months, 1 week ago
Selected Answer: A
https://learn.microsoft.com/en-us/azure/synapse-analytics/metadata/table#examples
upvoted 1 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 ...