Generate HTML documentation from SQL queries
Project description
SQL Docs is a framework designed to standardize SQL query documentation. Its goal is to provide a clear and consistent structure that facilitates readability, maintenance, and the automatic generation of documentation in HTML.
🎯 Objective
The framework is divided into 7 sections:
- Sections 1 to 5 must be completed before writing the SQL query.
- Sections 6 and 7 accompany the writing of the query, describing its different parts.
📑 Framework Structure
- 1- Summary → Summary of the purpose of the query.
- 2- Related Programs → Related queries.
- 3- Sources → Data sources used.
- 4- Products → Result of the query (table, view, insert, etc.).
- 5- Historical Versions → Change log.
- 6- Steps → Step-by-step comments and explanations of the process.
- 7- Notes (NT) → Additional observations about the query.
⚠️ Important Notes
- It is mandatory to follow the framework’s wording to allow for the subsequent automatic generation of HTML.
- Sections can be omitted depending on project needs (this does not affect HTML export).
- Each section must begin and end with the correct syntax.
📑 Details of each framework section:
-
Summary: Brief summary of the purpose of the query. Created Date: xx/xx/xxxx Description: Technical/functional details about the operation of the query. References: E.g., ticket or issue number.
-
Related Programs: List of other processes related to the query (e.g., other queries, PY files, processes, dashboards, etc.). Program: For example a query name.
-
Sources: This section details each of the consumed data sources. source_1 source_2 source_3
-
Product 1: Here you describe each of the products generated by the query, such as a table, view, insert, etc. Description: Brief description of the product. Name: Table/view name. Type: Table/View/Insert/Update/Delete. Process: Create or Replace / Truncate / etc.
-
Historical Versions: A record of changes made to the query. Date -(User)- Description of the change. 01/01/2025-(john.doe)- Initial creation. 15/01/2025-(jane.smith)- Filter adjustment.
-
Step 1: Short comment of the logic applied in the query. Used to divide it into stages, explaining the goal of each part of the process.
-
NT: Special comments that apply to specific lines of the query, relevant for understanding the process.
📑 HTML Example:
📑 Framework to copy:
/* SUMMARY */
-- name: example_name -- created_date: 2025-01-01 -- description: example description -- references: Ticket 1234
/* RELATED PROGRAMS */
-- - Example.sql -- - Example.sql
/* SOURCES */
-- - example.example.source -- - prod_bronze.mktinfo.cotizacion_vt7
/* PRODUCTS */
-- - name: example_name -- type: table -- description: example description -- process: create or replace
-- - name: example_name -- type: table -- description: example description -- process: create or replace
/* HISTORICAL VERSIONS */
-- - date: 2025-01-01 -- user: Example User -- description: created query
-- - date: 2025-01-01 -- user: Example User -- description: created query
/* PROCESS COMMENTS */
-- STEP 1: use this for explain the main process -- STEP 2: use this for explain the main process -- STEP 3: use this for explain the main process -- LC: Use this espace for specials lines coments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqldocs-0.1.1.tar.gz.
File metadata
- Download URL: sqldocs-0.1.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8f44fb0eec0dc1894933f6c25364f9a26981755a53969df1c5f799dadab4537
|
|
| MD5 |
57e48d70354944fe206f0e01c6ff8d35
|
|
| BLAKE2b-256 |
13894526e73408893d0a9c0284e38d0a6ff137f2e9adff57419a148bb7255cb1
|
File details
Details for the file sqldocs-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sqldocs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f80bcef21a5c300f8e6fd85f745ad55f02ee8196f6b2136d770b609a65b1ed59
|
|
| MD5 |
8ec13badda4919ab6a57507af0f8b0c7
|
|
| BLAKE2b-256 |
16fd8b3875cb4e2b8595c5bd533d8d574dd0ad0ddb6f8997524bfcedb6ed2e5e
|