Which query should you execute?

You have a file named File1.txt that has the following characteristics:

• A header row

• Tab delimited values

• UNIX-style line endings

You need to read File1.txt by using an Azure Synapse Analytics serverless SQL pool.

Which query should you execute?

A . Option A
B. Option B
C. Option C
D. Option D

Answer: A

Explanation:

Use FIELDTERMINATOR =’t’ for tab.

Use ROWTERMINATOR =’x0A ‘ for UNIX-style line endings

Use FIRSTROW= 2 for a header row

Note: Using Row Terminators

The row terminator can be the same character as the terminator for the last field. Generally, however, a distinct row terminator is useful. For example, to produce tabular output, terminate the last field in each row with the newline character (n) and all other fields with the tab character (t).

If you want to output a line feed character only (LF) as the row terminator – as is typical on Unix and Linux computers – use hexadecimal notation to specify the LF row terminator.

For example:

bcp -r ‘0x0A’

FIRSTROW

FIRSTROW =first_row Specifies the number of the first row to load. The default is 1. This indicates the first row in the specified data file. The row numbers are determined by counting the row terminators. FIRSTROW is 1-based.

Reference:

https://docs.microsoft.com/en-us/sql/relational-databases/import-export/specify-field-and-row-terminators-sql-server

https://docs.microsoft.com/en-us/sql/t-sql/functions/openrowset-transact-sql

Latest DP-500 Dumps Valid Version with 83 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments