exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 1 question 77 discussion

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

You have an Azure subscription that contains the resources shown in the following table.



You need to read the TSV files by using ad-hoc queries and the OPENROWSET function. The solution must assign a name and override the inferred data type of each column.

What should you include in the OPENROWSET function?

  • A. the WITH clause
  • B. the ROWSET_OPTIONS bulk option
  • C. the DATAFILETYPE bulk option
  • D. the DATA_SOURCE parameter
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
henryphchan
Highly Voted 2 years ago
Selected Answer: A
In the Question "The solution must assign a name and override the inferred data type of each column", so we must need a WITH Clause to define the column names and data types.
upvoted 18 times
...
19c1ee5
Highly Voted 2 years ago
I think it's A. WITH CLAUSE https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-openrowset
upvoted 9 times
jlad26
2 years ago
Agreed - Should be A. "To specify explicit column names and data types, you can override the default column names and inferred data types by providing a schema definition in a WITH clause" (https://learn.microsoft.com/en-us/training/modules/query-data-lake-using-azure-synapse-serverless-sql-pools/3-query-files)
upvoted 6 times
...
...
EmnCours
Most Recent 5 months, 2 weeks ago
Selected Answer: A
Selected Answer: A
upvoted 1 times
...
ahana1074
8 months, 1 week ago
A is correct because-:SELECT * FROM OPENROWSET( BULK 'https://storage1.blob.core.windows.net/container/file.tsv', FORMAT='CSV', PARSER_VERSION='2.0', FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n' ) WITH ( Column1Name datatype1, Column2Name datatype2, Column3Name datatype3 ) AS result; B. ROWSET_OPTIONS bulk option: Configures aspects of data processing like buffering or parallelism, but it doesn’t handle column names or types. C. DATAFILETYPE bulk option: Used to specify the file type but not for defining column names or types. D. DATA_SOURCE parameter: Points to an external data source, but it doesn't help with naming or overriding data types. Thus, the WITH clause is the correct option to include in the OPENROWSET function to assign column names and override inferred data types.
upvoted 5 times
...
DanielCruz
10 months ago
DATA_SOURCE is not even an existing parameter option in th OPENROWSET function, the right existing option is DATASOURCE, without underscore, but it is not needed here, so A is the right option, see doc: https://learn.microsoft.com/en-us/sql/t-sql/functions/openrowset-transact-sql?view=sql-server-ver16
upvoted 1 times
...
[Removed]
1 year, 1 month ago
Selected Answer: A
A is correct
upvoted 1 times
...
MBRSDG
1 year, 1 month ago
Question insists on the point that the file has not the header row! specifying a datasource is not strictly required, since OPENROWSET can connect to storage even with a simple link and managed identity. The WITH clause is the most reasonable recommendation to include in the solution.
upvoted 1 times
...
Alongi
1 year, 1 month ago
Selected Answer: A
There isn't header, so you have to specify columns name manually in WITH clause
upvoted 2 times
...
gplusplus
1 year, 1 month ago
Selected Answer: D
With clause can be omitted for csv files see automatic schema discovery at https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-openrowset#automatic-schema-discovery Generic colnames will be assigned
upvoted 1 times
gplusplus
1 year, 1 month ago
on secodn thought, even if the types CAN be inferred, the question clearly states that the inferred types MUST be overwritten. Therefore WITH
upvoted 2 times
...
...
s_unsworth
1 year, 2 months ago
Selected Answer: A
There is no header row, therefore you should define one using the WITH Clause
upvoted 1 times
...
Charley92
1 year, 3 months ago
Selected Answer: A
The WITH clause allows you to specify the schema of the data source and override the inferred data type of each column. You can also use the WITH clause to specify the name of the external table and the location of the data source
upvoted 1 times
...
prshntdxt7
1 year, 3 months ago
Selected Answer: A
WITH CLAUSE
upvoted 1 times
...
Momoanwar
1 year, 5 months ago
Selected Answer: A
To read TSV files without a header row using the `OPENROWSET` function and to assign a name and specify the data type for each column, you should use: A. the WITH clause The WITH clause is used in the `OPENROWSET` function to define the format file or to directly define the structure of the file by specifying the column names and data types.
upvoted 1 times
...
hcq31818
1 year, 5 months ago
Selected Answer: A
A - WITH Clause is the correct answer.
upvoted 1 times
...
Runaj
1 year, 6 months ago
Selected Answer: D
D is right.
upvoted 1 times
...
jhargett1
1 year, 6 months ago
Selected Answer: A
To read TSV (Tab-Separated Values) files using ad-hoc queries and the OPENROWSET function in Azure Synapse Analytics, and to assign a name and override the inferred data type of each column, you should include the following in the OPENROWSET function: A. the WITH clause The WITH clause allows you to specify options for reading the data, including defining the column names and data types. You can use the WITH clause to provide column definitions and specify the data type for each column in the TSV file, which allows you to override the inferred data types.
upvoted 2 times
...
Metaalverf
1 year, 6 months ago
Selected Answer: D
They ask for "in the function", not "in the query"
upvoted 5 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