Search⌘ K
AI Features

Solution: Targets, Tests, and Documentation

Understand how to implement targets and tests in dbt to manage development and production environments. Learn to add unique tests to ensure data quality and create descriptions for model documentation to support clear communication. This lesson helps you enhance data validation, environment management, and maintain well-documented data models.

We'll cover the following...

Solution

Let’s review the solution to the problem.

{% macro manage_view() %}
ALTER VIEW {{ this }} 
SET OPTIONS (labels = [('managed_by', 'dbt')]);
{% endmacro %}
Solution code: Targeting, testing, and documenting

Code explanation

In the schema.yml file: ...