ORE Studio 0.0.4
Loading...
Searching...
No Matches
Classes | Functions | Variables
src.plantuml_er_parse_sql Namespace Reference

Classes

class  Column
 
class  Function
 
class  Index
 
class  ParseResult
 
class  Relationship
 
class  SQLParser
 
class  Table
 
class  View
 
class  Warning
 

Functions

 main ()
 

Variables

dict COMPONENT_PREFIXES
 
str SCHEMA_PATTERN = r'(?:public)'
 
dict FK_COLUMNS
 
dict FK_TARGET_TABLES
 
dict TABLE_STYLES
 

Detailed Description

PlantUML ER Diagram - SQL Parser

Parses SQL CREATE/DROP statements to generate a JSON model for ER diagram
generation. Validates SQL against conventions defined in SKILL.org.

Variable Documentation

◆ COMPONENT_PREFIXES

dict COMPONENT_PREFIXES
Initial value:
1= {
2 'ores_iam_': {'name': 'iam', 'description': 'Identity & Access Management', 'schema': 'public', 'color': '#E8F4FD', 'order': 1},
3 'ores_assets_': {'name': 'assets', 'description': 'Digital Assets', 'schema': 'public', 'color': '#F3E5F5', 'order': 2},
4 'ores_refdata_': {'name': 'refdata', 'description': 'Reference Data', 'schema': 'public', 'color': '#FFF3E0', 'order': 3},
5 'ores_dq_': {'name': 'dq', 'description': 'Data Quality', 'schema': 'public', 'color': '#E1F5FE', 'order': 4},
6 'ores_variability_': {'name': 'variability', 'description': 'Feature Flags', 'schema': 'public', 'color': '#E8F5E9', 'order': 5},
7 'ores_telemetry_': {'name': 'telemetry', 'description': 'Telemetry & Logging', 'schema': 'public', 'color': '#FCE4EC', 'order': 6},
8 'ores_geo_': {'name': 'geo', 'description': 'Geolocation', 'schema': 'public', 'color': '#FFF9C4', 'order': 7},
9 'ores_dq_fsm_': {'name': 'dq_fsm', 'description': 'FSM (Data Quality)', 'schema': 'public', 'color': '#E8EAF6', 'order': 8},
10 'ores_trading_': {'name': 'trading', 'description': 'Trading & Lifecycle', 'schema': 'public', 'color': '#E8F5E9', 'order': 9},
11 'ores_mq_': {'name': 'mq', 'description': 'Message Queue (pgmq)', 'schema': 'public', 'color': '#FBE9E7', 'order': 10},
12 'ores_scheduler_': {'name': 'scheduler', 'description': 'Job Scheduler (pg_cron)', 'schema': 'public', 'color': '#F1F8E9', 'order': 11},
13 'ores_reporting_': {'name': 'reporting', 'description': 'Reporting & Analytics', 'schema': 'public', 'color': '#E0F7FA', 'order': 12},
14 'ores_compute_': {'name': 'compute', 'description': 'Distributed Compute Grid (BOINC)', 'schema': 'public', 'color': '#EDE7F6', 'order': 13},
15 'ores_utility_': {'name': 'utility', 'description': 'Utility Functions', 'schema': 'public', 'color': '#ECEFF1', 'order': 14},
16 'ores_seed_': {'name': 'seed', 'description': 'Seed Functions', 'schema': 'public', 'color': '#ECEFF1', 'order': 15},
17 'ores_database_': {'name': 'database', 'description': 'Database Infrastructure', 'schema': 'public', 'color': '#EFEBE9', 'order': 16},
18}

◆ FK_COLUMNS

dict FK_COLUMNS
Initial value:
1= {
2 'change_reason_code', # References change reason codes
3 'coding_scheme_code', # References coding schemes
4 'category_code', # References change reason categories
5 'account_id', # References iam_accounts_tbl
6 'role_id', # References iam_roles_tbl
7 'permission_id', # References iam_permissions_tbl
8 'image_id', # References assets_images_tbl
9 'tag_id', # References assets_tags_tbl
10 'dataset_id', # References dq_datasets_tbl
11 'methodology_id', # References dq_methodologies_tbl
12 'authority_type', # References dq_coding_scheme_authority_types_tbl
13 'nature_code', # References dq_nature_dimensions_tbl
14 'origin_code', # References dq_origin_dimensions_tbl
15 'treatment_code', # References dq_treatment_dimensions_tbl
16 'country_code', # References refdata_countries_tbl
17 'currency_code', # References refdata_currencies_tbl
18}

◆ FK_TARGET_TABLES

dict FK_TARGET_TABLES
Initial value:
1= {
2 # IAM
3 'account_id': 'iam_accounts_tbl',
4 'role_id': 'iam_roles_tbl',
5 'permission_id': 'iam_permissions_tbl',
6 'session_id': 'iam_sessions_tbl',
7 # Assets
8 'image_id': 'assets_images_tbl',
9 'tag_id': 'assets_tags_tbl',
10 # Data Quality - Core
11 'dataset_id': 'dq_datasets_tbl',
12 'coding_scheme_code': 'dq_coding_schemes_tbl',
13 'change_reason_code': 'dq_change_reasons_tbl',
14 'category_code': 'dq_change_reason_categories_tbl',
15 'catalog_name': 'dq_catalogs_tbl',
16 'domain_name': 'dq_data_domains_tbl',
17 'subject_area_name': 'dq_subject_areas_tbl',
18 'methodology_id': 'dq_methodologies_tbl',
19 'authority_type': 'dq_coding_scheme_authority_types_tbl',
20 # Data Quality - Dimensions
21 'nature_code': 'dq_nature_dimensions_tbl',
22 'origin_code': 'dq_origin_dimensions_tbl',
23 'treatment_code': 'dq_treatment_dimensions_tbl',
24 # Dataset derivation (self-reference)
25 'upstream_derivation_id': 'dq_datasets_tbl',
26 # Reference data
27 'country_code': 'refdata_countries_tbl',
28 'currency_code': 'refdata_currencies_tbl',
29}

◆ TABLE_STYLES

dict TABLE_STYLES
Initial value:
1= {
2 'temporal': {'stereotype': '<<temporal>>', 'color': '#C6F0D8'},
3 'artefact': {'stereotype': '', 'color': '#F7E5FF'},
4 'junction': {'stereotype': '<<junction>>', 'color': '#ECECEC'},
5 'current_state': {'stereotype': '', 'color': '#F7E5FF'},
6}