Contributing¶
First, follow the Setup guide, and read this page. Then, learn how to Edit SQL files or follow the How-to guides.
See also
SQL files¶
The SQL statements that summarize data are stored in SQL files in the sql/middle directory. The add command runs these SQL files.
The dependencies between SQL files are automatically determined. Files should create one table and/or view and related indices, and should not drop tables. Instead, any temporary tables should be dropped in sql/final/drop.sql
.
SQL files are named after the tables they create, though some files don’t match table names:
*_tmp.sql
For example, the
tmp_planning_summary
table is created in theplanning_tmp.sql
file, so that it appears next to files that create planning tables.parties_*_summary.sql
For example, the
buyer_summary
table is created in theparties_buyer_summary.sql
file, so that it appears next to other files that create parties tables.agg_*.sql
For example, the
tmp_planning_documents_aggregates
table is created in theagg_planning.sql
file, so that it appears next to other files that create temporary aggregates.