Free Databricks-Certified-Data-Analyst-Associate Exam Braindumps (page: 5)

Page 5 of 12

The stakeholders.customers table has 15 columns and 3,000 rows of data. The following command is run:



After running SELECT * FROM stakeholders.eur_customers, 15 rows are returned. After the command executes completely, the user logs out of Databricks.

After logging back in two days later, what is the status of the stakeholders.eur_customers view?

  1. The view remains available and SELECT * FROM stakeholders.eur_customers will execute correctly.
  2. The view has been dropped.
  3. The view is not available in the metastore, but the underlying data can be accessed with SELECT * FROM delta. `stakeholders.eur_customers`.
  4. The view remains available but attempting to SELECT from it results in an empty result set because data in views are automatically deleted after logging out.
  5. The view has been converted into a table.

Answer(s): B

Explanation:

The command you sent creates a TEMP VIEW, which is a type of view that is only visible and accessible to the session that created it.
When the session ends or the user logs out, the TEMP VIEW is automatically dropped and cannot be queried anymore. Therefore, after logging back in two days later, the status of the stakeholders.eur_customers view is that it has been dropped and SELECT * FROM stakeholders.eur_customers will result in an error. The other options are not correct because:

A) The view does not remain available, as it is a TEMP VIEW that is dropped when the session ends or the user logs out.

C) The view is not available in the metastore, as it is a TEMP VIEW that is not registered in the metastore. The underlying data cannot be accessed with SELECT * FROM delta. stakeholders.eur_customers, as this is not a valid syntax for querying a Delta Lake table. The correct syntax would be SELECT * FROM delta.dbfs:/stakeholders/eur_customers, where the location path is enclosed in backticks. However, this would also result in an error, as the TEMP VIEW does not write any data to the file system and the location path does not exist.

D) The view does not remain available, as it is a TEMP VIEW that is dropped when the session ends or the user logs out. Data in views are not automatically deleted after logging out, as views do not store any data. They are only logical representations of queries on base tables or other views.

E) The view has not been converted into a table, as there is no automatic conversion between views and tables in Databricks. To create a table from a view, you need to use a CREATE TABLE AS statement or a similar command.


Reference:

CREATE VIEW | Databricks on AWS, Solved: How do temp views actually work? - Databricks - 20136, temp tables in Databricks - Databricks - 44012, Temporary View in Databricks - BIG DATA PROGRAMMERS, Solved: What is the difference between a Temporary View an ...



A data analyst created and is the owner of the managed table my_ table. They now want to change ownership of the table to a single other user using Data Explorer.

Which of the following approaches can the analyst use to complete the task?

  1. Edit the Owner field in the table page by removing their own account
  2. Edit the Owner field in the table page by selecting All Users
  3. Edit the Owner field in the table page by selecting the new owner's account
  4. Edit the Owner field in the table page by selecting the Admins group
  5. Edit the Owner field in the table page by removing all access

Answer(s): C

Explanation:

The Owner field in the table page shows the current owner of the table and allows the owner to change it to another user or group. To change the ownership of the table, the owner can click on the Owner field and select the new owner from the drop-down list. This will transfer the ownership of the table to the selected user or group and remove the previous owner from the list of table access control entries1. The other options are incorrect because:

A) Removing the owner's account from the Owner field will not change the ownership of the table, but will make the table ownerless2.

B) Selecting All Users from the Owner field will not change the ownership of the table, but will grant all users access to the table3.

D) Selecting the Admins group from the Owner field will not change the ownership of the table, but will grant the Admins group access to the table3.

E) Removing all access from the Owner field will not change the ownership of the table, but will revoke all access to the table4.


Reference:

1: Change table ownership

2: Ownerless tables

3: Table access control

4: Revoke access to a table



A data analyst has a managed table table_name in database database_name. They would now like to remove the table from the database and all of the data files associated with the table. The rest of the tables in the database must continue to exist.

Which of the following commands can the analyst use to complete the task without producing an error?

  1. DROP DATABASE database_name;
  2. DROP TABLE database_name.table_name;
  3. DELETE TABLE database_name.table_name;
  4. DELETE TABLE table_name FROM database_name;
  5. DROP TABLE table_name FROM database_name;

Answer(s): B

Explanation:

The DROP TABLE command removes a table from the metastore and deletes the associated data files. The syntax for this command is DROP TABLE [IF EXISTS] [database_name.]table_name;. The optional IF EXISTS clause prevents an error if the table does not exist. The optional database_name. prefix specifies the database where the table resides. If not specified, the current database is used. Therefore, the correct command to remove the table table_name from the database database_name and all of the data files associated with it is DROP TABLE database_name.table_name;. The other commands are either invalid syntax or would produce undesired results.


Reference:

Databricks - DROP TABLE



A data analyst runs the following command:

SELECT age, country

FROM my_table

WHERE age >= 75 AND country = 'canada';

Which of the following tables represents the output of the above command?

A)



B)



C)



D)



E)

  1. Option A
  2. Option B
  3. Option C
  4. Option D
  5. Option E

Answer(s): E

Explanation:

The SQL query provided is designed to filter out records from "my_table" where the age is 75 or above and the country is Canada. Since I can't view the content of the links provided directly, I need to rely on the image attached to this question for context. Based on that, Option E (the image attached) represents a table with columns "age" and "country", showing records where age is 75 or above and country is Canada.


Reference:

The answer can be inferred from understanding SQL queries and their outputs as per Databricks documentation: Databricks SQL



Page 5 of 12



Post your Comments and Discuss Databricks Databricks-Certified-Data-Analyst-Associate exam with other Community members:

Kimmu Badger commented on August 09, 2024
Good Material
UNITED STATES
upvote