Azure Blob Storage Files for Azure Synapse | Querying EtTable1 | DP-203 Exam

Azure Blob Storage Files for Azure Synapse

Question

You have folders and files in Azure Blob Storage for the Azure Synapse.

You develop a native external table “EtTable1” with LOCATION='/webdata/'

If you query EtTable1 with Azure Synapse Analytics Serverless SQL POOL, choose from the following files that will be returned?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

Correct Answer: A

You have folders and files in Azure Blob Storage for the Azure Synapse workspace just like the below diagram:

/month/ /hiddenfolder/

mydata2.bt mydata3.t

If you want to return subfolders from Native external tables,you need to mention /** at the end of the path.

In the given case scenario, LOCATION='/webdata/'will make the query to return only mydata.txt, not mydata2.txt and mydata3.txt as these both files exist in the subfolders.

On the other hand, A Hadoop table returns all files within any subfolder.

Both Native and external tables skip the files with the names beginning with a period (.) or an underline (_)

Therefore, it won't return _hidden.txt as well.

Option A is correct.

In the given Scenario, the only mydata.txt will be returned.

Option B is incorrect.

mydata2.txt won't be returned as it is present in the subfolder and the location does not involve /** at the end.

Option C is incorrect.

mydata3.txt won't be returned as it is present in the subfolder and the location does not involve /** at the end.

Option D is incorrect.

The only mydata.txt will be returned.

Option E is incorrect.

Both Native and external tables skip the files with the names beginning with a period (.) or an underline (_)

Therefore, _hidden.txt won't be returned.

Option F is incorrect.

In the given Scenario, the only mydata.txt will be returned.

To know more about using external tables with Synapse SQL, please visit the below-given link:

Based on the information provided, we know that there is a native external table called "EtTable1" with LOCATION='/webdata/' in Azure Blob Storage. This means that the external table is pointing to a directory named "webdata" in Azure Blob Storage.

Now, we have a list of files that are present in the "webdata" directory. The files are:

  • mydata.txt
  • mydata2.txt
  • mydata3.txt
  • _hidden.txt

If we query the external table "EtTable1" with Azure Synapse Analytics Serverless SQL POOL, the files that will be returned depend on the files present in the "webdata" directory and the table schema defined for "EtTable1".

If the table schema includes only the file "mydata.txt", then only "mydata.txt" will be returned. Similarly, if the table schema includes only the file "mydata2.txt", then only "mydata2.txt" will be returned.

However, if the table schema includes all the files in the "webdata" directory, then all the files, including "mydata.txt", "mydata2.txt", "mydata3.txt", and "_hidden.txt" will be returned.

Without information on the table schema, it is impossible to determine which files will be returned. Therefore, the answer to the question is not definitive.

Option D, "mydata.txt, mydata2.txt, and mydata3.txt", is a possibility if the table schema includes only these files. Option E, "Only _hidden.txt", is unlikely as it specifies a single file, and there is no information to suggest that the table schema only includes this file. Option F, "All of these i.e mydata.txt, mydata2.txt, mydata3.txt, and _hidden.txt", is possible if the table schema includes all the files in the "webdata" directory.

Therefore, the correct answer is either D or F, depending on the table schema defined for "EtTable1".