Valid Databricks-Certified-Data-Engineer-Associate Dumps shared by ExamDiscuss.com for Helping Passing Databricks-Certified-Data-Engineer-Associate Exam! ExamDiscuss.com now offer the newest Databricks-Certified-Data-Engineer-Associate exam dumps, the ExamDiscuss.com Databricks-Certified-Data-Engineer-Associate exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com Databricks-Certified-Data-Engineer-Associate dumps with Test Engine here:
A data engineer has a Python variable table_name that they would like to use in a SQL query. They want to construct a Python code block that will run the query using table_name. They have the following incomplete code block: ____(f"SELECT customer_id, spend FROM {table_name}") Which of the following can be used to fill in the blank to successfully complete the task?
Correct Answer: E
The spark.sql method can be used to execute SQL queries programmatically and return the result as a DataFrame. The spark.sql method accepts a string argument that contains a valid SQL statement. The data engineer can use a formatted string literal (f-string) to insert the Python variable table_name into the SQL query. The other methods are either invalid or not suitable for running SQL queries. References: Running SQL Queries Programmatically, Formatted string literals, spark.sql