# Checklist data product

Having a data product ready requires a lot of different activities to be done. this checklist summarizes in high overview those differnet activities:

* [ ] **SQL models written with SQL best practices**
  * [ ] CTE to structure the SQL in case of big SQL
  * [ ] 100 lines maximum and otherwise split with ephemeral models
  * [ ] SQLFluff rules passing&#x20;
  * [ ] clustering fields
  * [ ] incremental models when possible
* [ ] **dbt\_project.yml contains main configuration for the project**
  * [ ] use variables when possible
  * [ ] config blocks at model level to override main config only if needs be
* [ ] **DRY code**
  * [ ] macros to not repeat code. Macros that can be reused by other data products must be put in the "dp-common" data product
  * [ ] dbt doc blocks to write documentation only once
  * [ ] yaml anchors
* [ ] **Documentation**
  * [ ] each dbt model must have a respective yml file with description for each column
  * [ ] macros and seeds to be documented as well
  * [ ] query comment to be configured in dbt\_project.yml
* [ ] **Testing**
  * [ ] data contracts with schema validation and semantic test on source data
  * [ ] dbt generic tests on key fields to check uniqueness, referential, etc.
  * [ ] dbt-expectations tests for more complex tests
  * [ ] dbt data integrity test on datamart&#x20;
* [ ] **Naming conventions**
  * [ ] file name ot be unique and start with data layer and then model name
  * [ ] alias to be defined in config black of each model and include table name without data layer prefix
* [ ] **Airflow**
  * [ ] Create a dev and a prd python file for the data product
  * [ ] DAG runs successfully in dev and coherent results in BI dashboards
    * [ ] if yes, deploy DAG to prd with schedule
