Contributing#
First, follow the Setup guide, and read this page. Then, learn how to Edit SQL files or follow the How-to guides.
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.sqlFor example, the
tmp_planning_summarytable is created in theplanning_tmp.sqlfile, so that it appears next to files that create planning tables.parties_*_summary.sqlFor example, the
buyer_summarytable is created in theparties_buyer_summary.sqlfile, so that it appears next to other files that create parties tables.agg_*.sqlFor example, the
tmp_planning_documents_aggregatestable is created in theagg_planning.sqlfile, so that it appears next to other files that create temporary aggregates.