
Answer-first summary for fast verification
Answer: 24
## Detailed Explanation Based on Azure Synapse Analytics architecture and metadata synchronization capabilities, the query will successfully return the value **24** (Option A). Here's the technical reasoning: ### Why Option A (24) is Correct: 1. **Metadata Synchronization Between Spark and SQL Pools**: - When you create a table in a Spark pool using `CREATE TABLE mytestdb.myParquetTable`, Azure Synapse automatically synchronizes the metadata to the serverless SQL pool. - The one-minute delay is sufficient for this synchronization to complete, ensuring the table is visible to the SQL pool. 2. **Schema Resolution with 'dbo'**: - In serverless SQL pools, Spark-created tables are automatically exposed in the `dbo` schema by default. - The reference `mytestdb.dbo.myParquetTable` correctly resolves to the table created in the Spark database. - This aligns with Microsoft's documented behavior where Spark tables become accessible as external tables in the `dbo` schema of the corresponding database in serverless SQL pools. 3. **Case Insensitivity**: - Serverless SQL pools in Azure Synapse are case-insensitive for table and column names by default. - The mixed-case table name `myParquetTable` in the query will successfully match the table created in Spark, regardless of case. 4. **Data Retrieval Logic**: - The inserted row contains `EmployeeID: 24` and `EmployeeName: 'Alice'`. - The WHERE clause `WHERE EmployeeName = 'Alice'` correctly filters for this specific record. - The SELECT statement `SELECT EmployeeID` will return the value `24` from the matching row. ### Why Other Options Are Incorrect: - **Option B (an error)**: This would only occur if there were actual connectivity issues, permission problems, or incorrect table references. However, the metadata synchronization and proper schema resolution make this scenario work correctly. - **Option C (a null value)**: This would only happen if no matching records were found, but we know a row with `EmployeeName = 'Alice'` exists with `EmployeeID: 24`. ### Best Practices Confirmation: This behavior follows Azure Synapse Analytics best practices where: - Spark-created tables are automatically available in serverless SQL pools - The `dbo` schema is the default for exposing Spark tables to SQL - Metadata synchronization typically completes within seconds, making the one-minute wait more than sufficient - Case-insensitive queries are supported by default in serverless SQL pools The query execution follows the expected integration pattern between Spark and serverless SQL pools in Azure Synapse Analytics.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have an Azure Synapse workspace named MyWorkspace containing an Apache Spark database named mytestdb. You execute the following command in a Spark pool within MyWorkspace:
CREATE TABLE mytestdb.myParquetTable(
EmployeeID int,
EmployeeName string,
EmployeeStartDate date)
USING Parquet
CREATE TABLE mytestdb.myParquetTable(
EmployeeID int,
EmployeeName string,
EmployeeStartDate date)
USING Parquet
You then insert a row into mytestdb.myParquetTable using Spark. The row contains the following data:
One minute later, you run this query from a serverless SQL pool in MyWorkspace:
SELECT EmployeeID
FROM mytestdb.dbo.myParquetTable
WHERE EmployeeName = 'Alice';
SELECT EmployeeID
FROM mytestdb.dbo.myParquetTable
WHERE EmployeeName = 'Alice';
What will the query return?

A
24
B
an error
C
a null value
No comments yet.