Questions and Answers
Question MeVqTX40PfqdEWAC711K
Question
Which Python variable contains a list of directories to be searched when trying to locate required modules?
Choices
- A: importlib.resource_path
- B: sys.path
- C: os.path
- D: pypi.path
- E: pylib.source
answer?
Answer: B Answer_ET: B Community answer B (100%) Discussion
Comment 1099494 by alexvno
- Upvotes: 7
Selected Answer: B sys. path is a built-in variable within the sys module. It contains a list of directories that the interpreter will search in for the required module
Comment 1326015 by Sriramiyer92
- Upvotes: 1
Selected Answer: B sys.path is a list in Python that contains the directories the interpreter searches for modules when importing them. It is initialized with the default paths when Python starts and can be modified during runtime if needed.
Comment 1299560 by benni_ale
- Upvotes: 1
Selected Answer: B sys.path is a built-in variable within the sys module. It contains a list of directories that the interpreter will search in for the required module.
Question TTuKjKEcZbEEOQllsYtW
Question
Incorporating unit tests into a PySpark application requires upfront attention to the design of your jobs, or a potentially significant refactoring of existing code. Which statement describes a main benefit that offset this additional effort?
Choices
- A: Improves the quality of your data
- B: Validates a complete use case of your application
- C: Troubleshooting is easier since all steps are isolated and tested individually
- D: Yields faster deployment and execution times
- E: Ensures that all steps interact correctly to achieve the desired end result
answer?
Answer: C Answer_ET: C Community answer C (100%) Discussion
Comment 1099499 by alexvno
- Upvotes: 5
Selected Answer: C Unit tests are small, isolated tests that are used to check specific parts of the code, such as functions or classes
Comment 1303256 by nedlo
- Upvotes: 2
Selected Answer: C D is integration tests (how they relate to each other how connect), E is E2E test, C is “testing individually” which is only one fittign definition of unittest
Comment 1231034 by jmjm21
- Upvotes: 1
Selected Answer: C Answer is C.
Question 0pcKzI21PdsGuSJ5JVkM
Question
Which statement describes integration testing?
Choices
- A: Validates interactions between subsystems of your application
- B: Requires an automated testing framework
- C: Requires manual intervention
- D: Validates an application use case
- E: Validates behavior of individual elements of your application
answer?
Answer: A Answer_ET: A Community answer A (100%) Discussion
Comment 1269351 by robodog
- Upvotes: 2
Selected Answer: A Answer is A
Comment 1099503 by alexvno
- Upvotes: 4
Selected Answer: A Integration testing is a type of software testing where components of the software are gradually integrated and then tested as a unified group
Question ZlE8i3jg0gHzvdrBWkoq
Question
Which REST API call can be used to review the notebooks configured to run as tasks in a multi-task job?
Choices
- A: /jobs/runs/list
- B: /jobs/runs/get-output
- C: /jobs/runs/get
- D: /jobs/get
- E: /jobs/list
answer?
Answer: D Answer_ET: D Community answer D (78%) 11% 11% Discussion
Comment 1327165 by AlejandroU
- Upvotes: 1
Selected Answer: E The correct answer is E. /jobs/list, not C. /jobs/runs/get. Here’s why: /jobs/list: Provides a list of all jobs in the workspace along with their configurations, including task details like the notebooks assigned to each task. This makes it the best choice for reviewing notebooks configured as tasks in a multi-task job. /jobs/get: Can also be used if the goal is to review the tasks (and notebooks) of a specific job. However, the question does not limit the scope to a single job.
Comment 1230681 by imatheushenrique
- Upvotes: 2
multi-task: /jobs/get single-task: /jobs/runs/get
Comment 1159661 by hal2401me
- Upvotes: 1
Selected Answer: D https://docs.databricks.com/api/workspace/jobs/get responses/settings/tasks/notebook_task/notebook_path
Comment 1110884 by divingbell17
- Upvotes: 4
Selected Answer: D The question asks for notebooks configured for a job, not a instance of a job run. D is correct.
Comment 1099508 by alexvno
- Upvotes: 1
Selected Answer: D Get Multi-task format jobs return an array of task data structures containing task settings.
Comment 1087777 by hamzaKhribi
- Upvotes: 1
Selected Answer: D /jobs/get response under task array shows all the desired notebooks
Comment 1084515 by arye777
- Upvotes: 1
Selected Answer: B should be B
Question iIJr36zuKbUAwtjssoZo
Question
A Databricks job has been configured with 3 tasks, each of which is a Databricks notebook. Task A does not depend on other tasks. Tasks B and C run in parallel, with each having a serial dependency on task A. If tasks A and B complete successfully but task C fails during a scheduled run, which statement describes the resulting state?
Choices
- A: All logic expressed in the notebook associated with tasks A and B will have been successfully completed; some operations in task C may have completed successfully.
- B: All logic expressed in the notebook associated with tasks A and B will have been successfully completed; any changes made in task C will be rolled back due to task failure.
- C: All logic expressed in the notebook associated with task A will have been successfully completed; tasks B and C will not commit any changes because of stage failure.
- D: Because all tasks are managed as a dependency graph, no changes will be committed to the Lakehouse until ail tasks have successfully been completed.
- E: Unless all tasks complete successfully, no changes will be committed to the Lakehouse; because task C failed, all commits will be rolled back automatically.
answer?
Answer: A Answer_ET: A Community answer A (100%) Discussion
Comment 1014736 by IT3008
- Upvotes: 9
Should be ‘A’ only, as ACID compliance is applicable at operation level. For example if task C is having 3 target delta table writes (in independent Notebook cells) then it could have after 1 write the task fails during 2nd write. In that case 1st write will still be persisted. The ACID compliance will be applicable for only the 2nd write.
Comment 1099511 by alexvno
- Upvotes: 5
Selected Answer: A A - for sure this is NOT ACID operations
Comment 1293863 by dd1192d
- Upvotes: 2
Selected Answer: A https://community.databricks.com/t5/data-engineering/does-cancelling-a-job-run-rollback-any-actions-performed-by/td-p/8135
Comment 988789 by tkg13
- Upvotes: 2
Correct answer should be B as Databricks is ACID compliant