refactor complete
This commit is contained in:
38
specs/012-remove-superset-tool/data-model.md
Normal file
38
specs/012-remove-superset-tool/data-model.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Data Model: 012-remove-superset-tool
|
||||
|
||||
## Entities
|
||||
|
||||
### 1. Environment (Updated)
|
||||
- **Source**: `backend/src/core/config_models.py`
|
||||
- **Purpose**: Represents a Superset environment configuration, now incorporating all fields required for the `SupersetClient`.
|
||||
- **Fields**:
|
||||
- `id`: `str` (Unique identifier)
|
||||
- `name`: `str` (Display name)
|
||||
- `url`: `str` (Base URL for API)
|
||||
- `username`: `str`
|
||||
- `password`: `str`
|
||||
- `verify_ssl`: `bool` (Default: `True`)
|
||||
- `timeout`: `int` (Default: `30`)
|
||||
- `is_default`: `bool` (Default: `False`)
|
||||
- `backup_schedule`: `Schedule`
|
||||
- **Validation Rules**:
|
||||
- `url` must start with `http://` or `https://`.
|
||||
- `timeout` must be positive.
|
||||
|
||||
### 2. API Contract (SupersetClient)
|
||||
- **Source**: `backend/src/core/superset_client.py`
|
||||
- **Purpose**: Self-contained client for Superset API interactions.
|
||||
- **Key Methods**:
|
||||
- `authenticate()`
|
||||
- `get_dashboards(query)`
|
||||
- `get_datasets(query)`
|
||||
- `get_databases(query)`
|
||||
- `export_dashboard(dashboard_id)`
|
||||
- `import_dashboard(file_name, dash_id, dash_slug)`
|
||||
- `delete_dashboard(dashboard_id)`
|
||||
- `get_databases_summary()`
|
||||
- `get_dashboards_summary()`
|
||||
|
||||
## State Transitions
|
||||
- **Authentication**: Unauthenticated -> Authenticated (token stored in memory/client session).
|
||||
- **Import/Export**: File System <-> Superset API.
|
||||
Reference in New Issue
Block a user