Skip to content

Conversation

@MrBlack1995
Copy link
Contributor

Summary

Backend changes for KPI parsers and measure conversion infrastructure.

Changes

  • Backend changes for KPI parsers
  • Measure conversion infrastructure
  • YAML to DAX migration and converters package reorganization

Related Commits

  • 3a7d2b3 Backend changes KPI parsers
  • 1360236 Migrate yaml2dax and reorganize converters package structure
  • 6a5ca0b Add measure conversion infrastructure

🤖 Generated with Claude Code

MrBlack1995 and others added 10 commits November 7, 2025 18:21
Front page/ README optical changes
Implement base architecture for converting business measures between formats (YAML, DAX, SQL, UC Metrics, Power BI).

- Create converters package with clean architecture pattern
  - Base classes: BaseConverter, ConverterFactory
  - Data models: KBI, DAXMeasure, SQLMeasure, UCMetric
  - Placeholder structure for formats, rules, and utilities

- Add API layer
  - REST endpoints: /api/measure-conversion/*
  - Routes: convert, validate, batch-convert, get formats
  - Register router in main API

- Add service layer
  - MeasureConversionService for business logic
  - Async operations with error handling
  - Factory pattern for converter instantiation

- Add Pydantic schemas
  - Request/response models
  - Validation schemas
  - OpenAPI documentation

- Add comprehensive README with usage examples

Prepared for integration of existing yaml2dax conversion logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Integrate all working yaml2dax conversion logic and reorganize into clean,
hierarchical package structure with improved naming conventions.

## Migration
- Migrate all yaml2dax components (parsers, generators, processors, translators)
- Create concrete converter implementations (YAML→DAX, YAML→SQL, YAML→UC Metrics)
- Auto-register all converters via registry module
- Update all imports to new package structure

## Reorganization
- Rename: measure/ → processors/ (clearer purpose)
- Split formats/ into parsers/ and generators/ subdirectories
- Split rules/ into aggregations/ and translators/ subdirectories
- Move converters to implementations/ subdirectory
- Rename converter files for consistency (remove _converter suffix)

## New Structure
converters/
├── base/               # Framework (BaseConverter, ConverterFactory)
├── models/             # Data models (KBI, SQL models)
├── formats/
│   ├── parsers/       # YAML, formula parsers
│   └── generators/    # DAX, SQL generators
├── processors/         # Structure, UC metrics processors
├── rules/
│   ├── aggregations/  # DAX, SQL aggregation rules
│   └── translators/   # Filter, formula, dependency resolvers
├── implementations/    # Concrete converters (yaml_to_dax, yaml_to_sql, yaml_to_uc_metrics)
└── registry.py        # Auto-registration

## Components Migrated (18 files)
- Parsers: yaml_parser, formula_parser
- Generators: dax_generator, sql_generator, smart_dax, tree_parsing_dax
- Processors: structure_processor, sql_structure_processor, uc_metrics_processor
- Rules: filter_resolver, formula_translator, dependency_resolver
- Aggregations: dax_aggregations, sql_aggregations
- Models: sql_models (SQLQuery, SQLDialect, etc.)
- Converters: 3 concrete implementations

## Benefits
- Clean hierarchical organization
- Logical grouping by purpose
- Consistent naming conventions
- Easy to extend and maintain
- Industry-standard package structure

All yaml2dax conversion logic now integrated and functional via API endpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants