Valid dbt-Analytics-Engineering Dumps shared by EduDump.com for Helping Passing dbt-Analytics-Engineering Exam! EduDump.com now offer the newest dbt-Analytics-Engineering exam dumps, the EduDump.com dbt-Analytics-Engineering exam questions have been updated and answers have been corrected get the newest EduDump.com dbt-Analytics-Engineering dumps with Test Engine here:
You define a new generic test on model customers in a YAML file: version: 2 models: - name: customers columns: - name: customer_id tests: - unique - not_null The next time your project compiles you get this error: Raw Error: mapping values are not allowed in this context in "<unicode string>", line 7, column 21 What is the cause of this error?
Correct Answer: D
This error occurs because the YAML structure is incorrectly indented, causing dbt's parser (and YAML itself) to misinterpret the test definitions. In dbt, generic tests must be declared as a list under the tests: key, but YAML is extremely sensitive to indentation levels. In the faulty YAML, unique and not_null are indented incorrectly relative to the tests: key, which produces the error: "mapping values are not allowed in this context." According to the dbt Testing documentation, valid generic test syntax follows this exact pattern: columns: - name: id tests: - unique - not_null The indentation under tests: must be consistent and aligned so that YAML interprets the items as list elements, not as malformed mappings. When indentation is wrong, YAML attempts to parse list entries as key-value mappings, which leads to the error seen during compilation. dbt does not require generic test names to be quoted, nor does it expect tests to be a dictionary. The test list format is correct-only the indentation is wrong. Therefore, the root cause is incorrect YAML indentation, making Option D correct.