Questions and Answers
Question QqXTmCsks1PvDTUGNsZb
Question
Identify how the count_if function and the count where x is null can be used
Consider a table random_values with below data.
What would be the output of below query? select count_if(col > 1) as count_a. count(*) as count_b.count(col1) as count_c from random_values col1 0 1 2
NULL - 2 3
Choices
- A: 3 6 5
- B: 4 6 5
- C: 3 6 6
- D: 4 6 6
answer?
Answer: A Answer_ET: A Community answer A (100%) Discussion
Comment 1327339 by MultiCloudIronMan
- Upvotes: 7
Selected Answer: A count_if(col > 1): There are 3 values greater than 1 (2, 2, 3), so count_a is 3.
count()*: There are 6 rows in total, so count_b is 6.
count(col1): There are 5 non-null values (0, 1, 2, 2, 3), so count_c is 5.
Comment 1354947 by Sagnikcap
- Upvotes: 1
Selected Answer: A Sorry but the question is not presented properly. I think it should be written like this:- select count_if(col > 1) as count_a, count(*) as count_b,count(col) as count_c from random_values
Comment 1300085 by jimboslims
- Upvotes: 2
table random_values with data not provided. there is no screenshot of the table.
Question Ls0lbEXY09HR2o1hmK3s
Question
Which two components function in the DB platform architecture’s control plane? (Choose two.)
Choices
- A: Virtual Machines
- B: Compute Orchestration
- C: Serverless Compute
- D: Compute
- E: Unity Catalog
answer?
Answer: BE Answer_ET: BE Community answer BE (100%) Discussion
Comment 1327340 by MultiCloudIronMan
- Upvotes: 2
Selected Answer: BE The correct answers are B. Compute Orchestration and E. Unity Catalog. These components function in the control plane of the Databricks platform architecture. Compute Orchestration manages the lifecycle and scheduling of clusters, while Unity Catalog provides centralized governance for data and AI assets.
Comment 1300086 by jimboslims
- Upvotes: 1
some ambiguity here. the answer can be D&E considering we see “Compute” and not “Compute Orchestration” on the Databricks control plane.
Question sQC88nWwPflUnkAzU2IU
Question
In a healthcare provider organization using Delta Lake to store electronic health records (EHRs), a data analyst needs to analyze a snapshot of the patient_records table from two weeks ago before some recent data corrections were applied.
What approach should the Data Engineer take to allow the analyst to query that specific prior version?
Choices
- A: Truncate the table to remove all data, then reload the data from two weeks ago into the truncated table for the analyst to query.
- B: Identify the version number corresponding to two weeks ago from the Delta transaction log, share that version number with the analyst to query using VERSION AS OF syntax, or export that version to a new Delta table for the analyst to query.
- C: Restore the table to the version from two weeks ago using the RESTORE command, and have the analyst query the restored table.
- D: Use the VACUUM command to remove all versions of the table older than two weeks, then the analyst can query the remaining version.
answer?
Answer: B Answer_ET: B Community answer B (100%) Discussion
Comment 1327341 by MultiCloudIronMan
- Upvotes: 2
Selected Answer: B We don’t want to change the current table
Comment 1322483 by Manish_Kum
- Upvotes: 1
Selected Answer: B B is correct
Comment 1300972 by RandomForest
- Upvotes: 1
Selected Answer: B B is the only correct answer as we do not want to remove any data.
Question cyOBbupUqHUH0weIxfhT
Question
A data engineer wants to create a new table containing the names of customers that live in France. They have written the following command: //IMG//
A senior data engineer mentions that it is organization policy to include a table property indicating that the new table includes personally identifiable information (PII). Which of the following lines of code fills in the above blank to successfully complete the task?
Choices
- A: There is no way to indicate whether a table contains PII.
- B: “COMMENT PII”
- C: TBLPROPERTIES PII
- D: COMMENT “Contains PII”
- E: PII
answer?
Answer: D Answer_ET: D Community answer D (100%) Discussion
Comment 1071087 by Huroye
- Upvotes: 10
The correct answer is D. COMMENT “Contains PII”. Context matters. Yes, you can use Table Property to add additional metadata. But you cannot view that property when you describe the table. With the Comment “this is …” anyone who describe the table <DESC
will see the comment.Comment 966044 by Gems1
- Upvotes: 7
D Ref:https://www.databricks.com/discover/pages/data-quality-management CREATE TABLE my_table (id INT COMMENT ‘Unique Identification Number’, name STRING COMMENT ‘PII’, age INT COMMENT ‘PII’) TBLPROPERTIES (‘contains_pii’=True) COMMENT ‘Contains PII’;
Comment 1244539 by 3fbc31b
- Upvotes: 1
Selected Answer: D The correct answer is D. There is no syntax for TBLPROPERTIES PII.
Comment 1203173 by benni_ale
- Upvotes: 1
Selected Answer: D D is correct
Comment 1177194 by Itmma
- Upvotes: 1
Selected Answer: D D is correct
Comment 1174938 by a_51
- Upvotes: 1
Selected Answer: D https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html COMMENT column_comment A string literal to describe the column.
Comment 1137305 by agAshish
- Upvotes: 2
answer C : CREATE TABLE new_table AS SELECT customer_name FROM original_table WHERE country = ‘France’ TBLPROPERTIES (‘PII’=‘true’);
Comment 1113194 by SerGrey
- Upvotes: 1
Selected Answer: D Correct answer is D
Comment 1064797 by awofalus
- Upvotes: 1
Selected Answer: D correct :D
Comment 1020505 by chris_mach
- Upvotes: 1
Selected Answer: D D is correct
Comment 1017352 by KalavathiP
- Upvotes: 1
Selected Answer: D D is correct
Comment 997917 by vctrhugo
- Upvotes: 1
Selected Answer: D D. COMMENT “Contains PII”
Comment 945999 by Atnafu
- Upvotes: 3
D The COMMENT keyword is used to add a comment to a table. The comment can be used to provide additional information about the table, such as its purpose or the data that it contains.
In this case, the data engineer wants to add a comment to the customersInFrance table indicating that the table contains PII. The following line of code will do this:
Code snippet COMMENT “Contains PII” Use code with caution. Learn more This will add the comment “Contains PII” to the customersInFrance table.
The other options are not valid ways to indicate that a table contains PII. The TBLPROPERTIES keyword is used to set the table properties, but there is no property for indicating whether a table contains PII. The PII keyword is not a valid keyword in SQL.
Therefore, the only valid way to indicate that a table contains PII is to use the COMMENT keyword.
Comment 903060 by Virendev
- Upvotes: 2
Selected Answer: D syntax of C is wrong.
Comment 889303 by softthinkers
- Upvotes: 2
Correct answer should be C asommand creates a new table called “customersInFrance” with the properties of Personally Identifiable Information (PII) and selects the columns ID, FIRSTNAME, LASTNAME, ADDRESS, and PHONE_NUMBER from the existing “customers” table where the country is France.
Comment 876211 by Varma_Saraswathula
- Upvotes: 1
Comment 875867 by naxacod574
- Upvotes: 1
Option D
Comment 862494 by XiltroX
- Upvotes: 1
Selected Answer: D Option D is the correct answer
Comment 860630 by sdas1
- Upvotes: 1
option D
Comment 859667 by surrabhi_4
- Upvotes: 2
Selected Answer: D option D
Comment 858877 by knivesz
- Upvotes: 2
Selected Answer: D La respuesta correcta es la D
Question I7oRuaBlGnOS6psNvtBg
Question
What can be used to simplify and unify siloed data architectures that are specialized for specific use cases?
Choices
- A: Delta Lake
- B: Data lake
- C: Data warehouse
- D: Data lakehouse
answer?
Answer: D Answer_ET: D Community answer D (100%) Discussion
Comment 1327346 by MultiCloudIronMan
- Upvotes: 1
Selected Answer: D To simplify and unify siloed data architectures that are specialized for specific use cases, the best approach is to use a data lakehouse. A data lakehouse combines the best features of data lakes and data warehouses, providing a single platform for all data use cases. This helps to streamline and integrate various data architectures, making it easier to manage and analyze data.
Comment 1322484 by Manish_Kum
- Upvotes: 1
Selected Answer: D Data Lakehouse
Comment 1320580 by Worldmaster
- Upvotes: 1
Selected Answer: D D. Data lakehouse