cognos2powerbi 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cognos2powerbi-0.1.0/.env.example +10 -0
- cognos2powerbi-0.1.0/.github/FUNDING.yml +3 -0
- cognos2powerbi-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +49 -0
- cognos2powerbi-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- cognos2powerbi-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +22 -0
- cognos2powerbi-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +23 -0
- cognos2powerbi-0.1.0/.github/workflows/ci.yml +43 -0
- cognos2powerbi-0.1.0/.github/workflows/publish.yml +54 -0
- cognos2powerbi-0.1.0/.gitignore +31 -0
- cognos2powerbi-0.1.0/CHANGELOG.md +31 -0
- cognos2powerbi-0.1.0/CODE_OF_CONDUCT.md +52 -0
- cognos2powerbi-0.1.0/CONTRIBUTING.md +63 -0
- cognos2powerbi-0.1.0/LICENSE +21 -0
- cognos2powerbi-0.1.0/PKG-INFO +213 -0
- cognos2powerbi-0.1.0/README.md +173 -0
- cognos2powerbi-0.1.0/SECURITY.md +30 -0
- cognos2powerbi-0.1.0/docs/ai-providers.md +49 -0
- cognos2powerbi-0.1.0/docs/architecture.md +44 -0
- cognos2powerbi-0.1.0/docs/coverage.md +47 -0
- cognos2powerbi-0.1.0/docs/getting-started.md +71 -0
- cognos2powerbi-0.1.0/docs/index.md +8 -0
- cognos2powerbi-0.1.0/docs/launch-playbook.md +79 -0
- cognos2powerbi-0.1.0/docs/roadmap.md +39 -0
- cognos2powerbi-0.1.0/examples/sample_model.xml +47 -0
- cognos2powerbi-0.1.0/examples/sample_report.xml +41 -0
- cognos2powerbi-0.1.0/pyproject.toml +91 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/__init__.py +7 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/api/__init__.py +1 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/api/main.py +118 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/cli.py +183 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/__init__.py +1 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/ai/__init__.py +12 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/ai/base.py +55 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/ai/providers.py +111 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/generators/__init__.py +5 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/generators/pbip_generator.py +272 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/ir/__init__.py +36 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/ir/models.py +178 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/parsers/__init__.py +11 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/parsers/model_parser.py +163 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/parsers/report_parser.py +208 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/pipeline.py +154 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/translate/__init__.py +5 -0
- cognos2powerbi-0.1.0/src/cognos2powerbi/core/translate/expressions.py +231 -0
- cognos2powerbi-0.1.0/tests/__init__.py +1 -0
- cognos2powerbi-0.1.0/tests/test_expressions.py +63 -0
- cognos2powerbi-0.1.0/tests/test_model_parser.py +43 -0
- cognos2powerbi-0.1.0/tests/test_pbip_generator.py +66 -0
- cognos2powerbi-0.1.0/tests/test_report_parser.py +58 -0
- cognos2powerbi-0.1.0/web/app.js +87 -0
- cognos2powerbi-0.1.0/web/index.html +73 -0
- cognos2powerbi-0.1.0/web/styles.css +159 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# AI provider selection: claude | copilot | codex | none
|
|
2
|
+
COGNOS2PBI_AI_PROVIDER=claude
|
|
3
|
+
|
|
4
|
+
# Path to the provider CLI executable (leave blank to use PATH default)
|
|
5
|
+
COGNOS2PBI_CLAUDE_CLI=claude
|
|
6
|
+
COGNOS2PBI_COPILOT_CLI=copilot
|
|
7
|
+
COGNOS2PBI_CODEX_CLI=codex
|
|
8
|
+
|
|
9
|
+
# Timeout in seconds for a single AI refinement call
|
|
10
|
+
COGNOS2PBI_AI_TIMEOUT=120
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a problem with a Cognos to Power BI migration
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thank you for filing a bug. Please remove or anonymize any sensitive identifiers from sample
|
|
9
|
+
input before attaching it.
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: what-happened
|
|
12
|
+
attributes:
|
|
13
|
+
label: What happened
|
|
14
|
+
description: A clear description of the bug and what you expected instead.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: repro
|
|
19
|
+
attributes:
|
|
20
|
+
label: Steps to reproduce
|
|
21
|
+
description: Include the exact command you ran.
|
|
22
|
+
placeholder: |
|
|
23
|
+
1. cognos2pbi migrate ./report.xml --out ./out/Report
|
|
24
|
+
2. ...
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: sample
|
|
29
|
+
attributes:
|
|
30
|
+
label: Sample Cognos input
|
|
31
|
+
description: Minimal, anonymized report specification or model that reproduces the issue.
|
|
32
|
+
- type: input
|
|
33
|
+
id: version
|
|
34
|
+
attributes:
|
|
35
|
+
label: Version
|
|
36
|
+
description: Output of `cognos2pbi --version`.
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
- type: dropdown
|
|
40
|
+
id: ai-provider
|
|
41
|
+
attributes:
|
|
42
|
+
label: AI provider
|
|
43
|
+
options:
|
|
44
|
+
- none
|
|
45
|
+
- claude
|
|
46
|
+
- copilot
|
|
47
|
+
- codex
|
|
48
|
+
validations:
|
|
49
|
+
required: true
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest a capability or supported conversion
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What migration scenario is not supported or is painful today?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: proposal
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposed solution
|
|
16
|
+
description: Describe the Cognos source and the desired Power BI output.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: alternatives
|
|
21
|
+
attributes:
|
|
22
|
+
label: Alternatives considered
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe the change and the migration scenario it improves.
|
|
4
|
+
|
|
5
|
+
Closes #
|
|
6
|
+
|
|
7
|
+
## Type of change
|
|
8
|
+
|
|
9
|
+
- [ ] Bug fix
|
|
10
|
+
- [ ] New parser or generator capability
|
|
11
|
+
- [ ] Expression translation
|
|
12
|
+
- [ ] Documentation
|
|
13
|
+
- [ ] Other
|
|
14
|
+
|
|
15
|
+
## Checklist
|
|
16
|
+
|
|
17
|
+
- [ ] `ruff check .` passes
|
|
18
|
+
- [ ] `ruff format --check .` passes
|
|
19
|
+
- [ ] `mypy src` passes
|
|
20
|
+
- [ ] `pytest` passes
|
|
21
|
+
- [ ] Added or updated tests
|
|
22
|
+
- [ ] Updated documentation and CHANGELOG where relevant
|
|
23
|
+
- [ ] No emojis added to code, docs, or commit messages
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Lint, type-check, and test
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
cache: pip
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install -e ".[dev,api]"
|
|
32
|
+
|
|
33
|
+
- name: Ruff lint
|
|
34
|
+
run: ruff check .
|
|
35
|
+
|
|
36
|
+
- name: Ruff format check
|
|
37
|
+
run: ruff format --check .
|
|
38
|
+
|
|
39
|
+
- name: Type check
|
|
40
|
+
run: mypy src
|
|
41
|
+
|
|
42
|
+
- name: Run tests
|
|
43
|
+
run: pytest --cov=cognos2powerbi --cov-report=term-missing
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes the package to PyPI when a GitHub Release is published.
|
|
4
|
+
# Uses PyPI Trusted Publishing (OIDC) - no API token or secret is stored in the repository.
|
|
5
|
+
# Configure the trusted publisher on PyPI before the first release:
|
|
6
|
+
# PyPI project: cognos2powerbi
|
|
7
|
+
# Owner: navintkr
|
|
8
|
+
# Repository: cognos-to-powerbi
|
|
9
|
+
# Workflow filename: publish.yml
|
|
10
|
+
# Environment: pypi
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
release:
|
|
14
|
+
types: [published]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: Build distribution
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
- name: Install build tooling
|
|
29
|
+
run: python -m pip install --upgrade build
|
|
30
|
+
- name: Build sdist and wheel
|
|
31
|
+
run: python -m build
|
|
32
|
+
- name: Upload distribution artifacts
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Publish to PyPI
|
|
40
|
+
needs: build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
environment:
|
|
43
|
+
name: pypi
|
|
44
|
+
url: https://pypi.org/project/cognos2powerbi/
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write
|
|
47
|
+
steps:
|
|
48
|
+
- name: Download distribution artifacts
|
|
49
|
+
uses: actions/download-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: dist
|
|
52
|
+
path: dist/
|
|
53
|
+
- name: Publish to PyPI
|
|
54
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
env/
|
|
11
|
+
|
|
12
|
+
# Test / coverage
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
.mypy_cache/
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
|
|
19
|
+
# Tooling
|
|
20
|
+
.env
|
|
21
|
+
.env.local
|
|
22
|
+
|
|
23
|
+
# Editors
|
|
24
|
+
.vscode/
|
|
25
|
+
.idea/
|
|
26
|
+
*.swp
|
|
27
|
+
.DS_Store
|
|
28
|
+
|
|
29
|
+
# Project output
|
|
30
|
+
out/
|
|
31
|
+
*.pbip.bak
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
6
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial project scaffold.
|
|
13
|
+
- Cognos report specification parser (beta).
|
|
14
|
+
- Cognos Framework Manager model parser with the `migrate-model` command, producing TMDL tables
|
|
15
|
+
and relationships.
|
|
16
|
+
- Deterministic Cognos-to-DAX expression translation library (references, arithmetic with
|
|
17
|
+
aggregates, if/then/else, case, common string and date functions).
|
|
18
|
+
- Parameterized SQL Server data-source wiring: generated models include `Server` and `Database`
|
|
19
|
+
parameters and `Sql.Database` partitions so the PBIP is refreshable. Configure with
|
|
20
|
+
`--source-type`, `--server`, `--database`, and `--schema`.
|
|
21
|
+
- Single-page web frontend served by the FastAPI backend for upload, analyze, and download.
|
|
22
|
+
- Vendor-neutral intermediate representation (IR).
|
|
23
|
+
- PBIP generator producing TMDL semantic models and PBIR reports.
|
|
24
|
+
- Provider-agnostic AI adapter for Claude, GitHub Copilot, and Codex CLIs.
|
|
25
|
+
- Command-line interface (`cognos2pbi`).
|
|
26
|
+
- FastAPI backend for the SaaS surface.
|
|
27
|
+
- PyPI publishing workflow using Trusted Publishing (OIDC).
|
|
28
|
+
|
|
29
|
+
## [0.1.0] - 2026-06-29
|
|
30
|
+
|
|
31
|
+
- First public preview.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a
|
|
6
|
+
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
|
7
|
+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
|
|
8
|
+
education, socio-economic status, nationality, personal appearance, race, religion, or sexual
|
|
9
|
+
identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive,
|
|
12
|
+
and healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment:
|
|
17
|
+
|
|
18
|
+
- Demonstrating empathy and kindness toward other people.
|
|
19
|
+
- Being respectful of differing opinions, viewpoints, and experiences.
|
|
20
|
+
- Giving and gracefully accepting constructive feedback.
|
|
21
|
+
- Accepting responsibility and apologizing to those affected by our mistakes.
|
|
22
|
+
- Focusing on what is best for the overall community.
|
|
23
|
+
|
|
24
|
+
Examples of unacceptable behavior:
|
|
25
|
+
|
|
26
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind.
|
|
27
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks.
|
|
28
|
+
- Public or private harassment.
|
|
29
|
+
- Publishing others' private information without explicit permission.
|
|
30
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting.
|
|
31
|
+
|
|
32
|
+
## Enforcement Responsibilities
|
|
33
|
+
|
|
34
|
+
Community leaders are responsible for clarifying and enforcing our standards and will take
|
|
35
|
+
appropriate and fair corrective action in response to any behavior that they deem inappropriate,
|
|
36
|
+
threatening, offensive, or harmful.
|
|
37
|
+
|
|
38
|
+
## Scope
|
|
39
|
+
|
|
40
|
+
This Code of Conduct applies within all community spaces and when an individual is officially
|
|
41
|
+
representing the community in public spaces.
|
|
42
|
+
|
|
43
|
+
## Enforcement
|
|
44
|
+
|
|
45
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the
|
|
46
|
+
community leaders responsible for enforcement at the contact address listed in
|
|
47
|
+
[SECURITY.md](SECURITY.md). All complaints will be reviewed and investigated promptly and fairly.
|
|
48
|
+
|
|
49
|
+
## Attribution
|
|
50
|
+
|
|
51
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
52
|
+
version 2.1.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Contributing to Cognos to Power BI
|
|
2
|
+
|
|
3
|
+
Thank you for helping build the most reliable open-source Cognos to Power BI migration tool. This
|
|
4
|
+
guide explains how to set up your environment, the conventions we follow, and how to submit changes.
|
|
5
|
+
|
|
6
|
+
## Ways to contribute
|
|
7
|
+
|
|
8
|
+
- Improve Cognos parsers (report specifications, Framework Manager, data modules).
|
|
9
|
+
- Improve PBIP generators (TMDL semantic models, PBIR reports).
|
|
10
|
+
- Add expression translations (Cognos expression -> DAX).
|
|
11
|
+
- Write tests, sample inputs, and documentation.
|
|
12
|
+
- Triage issues and review pull requests.
|
|
13
|
+
|
|
14
|
+
Look for issues labeled `good first issue` and `help wanted`.
|
|
15
|
+
|
|
16
|
+
## Development setup
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git clone https://github.com/navintkr/cognos-to-powerbi.git
|
|
20
|
+
cd cognos-to-powerbi
|
|
21
|
+
python -m venv .venv
|
|
22
|
+
# Windows: .venv\Scripts\activate macOS/Linux: source .venv/bin/activate
|
|
23
|
+
pip install -e ".[dev,api]"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Run the checks before opening a pull request:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ruff check .
|
|
30
|
+
ruff format --check .
|
|
31
|
+
mypy src
|
|
32
|
+
pytest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Architecture overview
|
|
36
|
+
|
|
37
|
+
The pipeline is parser -> intermediate representation (IR) -> generator -> optional AI refinement.
|
|
38
|
+
Keep parsers and generators decoupled through the IR. New Cognos inputs and new Power BI outputs
|
|
39
|
+
should never depend on each other directly. See [docs/architecture.md](docs/architecture.md).
|
|
40
|
+
|
|
41
|
+
## Coding conventions
|
|
42
|
+
|
|
43
|
+
- Format and lint with `ruff`.
|
|
44
|
+
- Type-check with `mypy`; add type hints to all public functions.
|
|
45
|
+
- Prefer small, pure functions in `core/`. Side effects belong in the CLI and API layers.
|
|
46
|
+
- Add or update tests for every behavior change.
|
|
47
|
+
- Do not add emojis to code, docs, or commit messages.
|
|
48
|
+
|
|
49
|
+
## Commit and pull request guidelines
|
|
50
|
+
|
|
51
|
+
- Use clear, imperative commit messages (for example, `Add crosstab parser for list reports`).
|
|
52
|
+
- Reference the issue number in the pull request description.
|
|
53
|
+
- Keep pull requests focused. Split unrelated changes.
|
|
54
|
+
- Ensure CI passes. Pull requests that fail CI will not be merged.
|
|
55
|
+
|
|
56
|
+
## Reporting bugs and requesting features
|
|
57
|
+
|
|
58
|
+
Open an issue using the provided templates. Include sample Cognos input (with sensitive data
|
|
59
|
+
removed) whenever possible so maintainers can reproduce the problem.
|
|
60
|
+
|
|
61
|
+
## Code of Conduct
|
|
62
|
+
|
|
63
|
+
Participation in this project is governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cognos to Power BI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cognos2powerbi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Open-source tool to migrate IBM Cognos reports and models to Microsoft Power BI (PBIP / TMDL / PBIR) with AI assistance.
|
|
5
|
+
Project-URL: Homepage, https://github.com/navintkr/cognos-to-powerbi
|
|
6
|
+
Project-URL: Documentation, https://github.com/navintkr/cognos-to-powerbi#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/navintkr/cognos-to-powerbi
|
|
8
|
+
Project-URL: Issues, https://github.com/navintkr/cognos-to-powerbi/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/navintkr/cognos-to-powerbi/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Cognos to Power BI contributors
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: business-intelligence,cognos,cognos-to-power-bi,data-migration,ibm-cognos,migration,pbip,pbir,power-bi,powerbi,report-conversion,tmdl
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Database
|
|
23
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: click>=8.1
|
|
26
|
+
Requires-Dist: lxml>=5.1
|
|
27
|
+
Requires-Dist: pydantic>=2.6
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: rich>=13.7
|
|
30
|
+
Provides-Extra: api
|
|
31
|
+
Requires-Dist: fastapi>=0.110; extra == 'api'
|
|
32
|
+
Requires-Dist: python-multipart>=0.0.9; extra == 'api'
|
|
33
|
+
Requires-Dist: uvicorn[standard]>=0.29; extra == 'api'
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: mypy>=1.9; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# Cognos to Power BI Migration Tool
|
|
42
|
+
|
|
43
|
+
**Migrate IBM Cognos reports and models to Microsoft Power BI automatically.** An open-source,
|
|
44
|
+
AI-assisted migration engine that converts Cognos report specifications into Power BI Project
|
|
45
|
+
(PBIP) format using TMDL semantic models and PBIR report definitions.
|
|
46
|
+
|
|
47
|
+
[](https://github.com/navintkr/cognos-to-powerbi/actions/workflows/ci.yml)
|
|
48
|
+
[](LICENSE)
|
|
49
|
+
[](https://www.python.org/downloads/)
|
|
50
|
+
[](CONTRIBUTING.md)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## What this project does
|
|
55
|
+
|
|
56
|
+
Organizations moving from **IBM Cognos Analytics** to **Microsoft Power BI** face a slow, manual,
|
|
57
|
+
error-prone migration. This tool automates the heavy lifting:
|
|
58
|
+
|
|
59
|
+
1. **Parse** Cognos report specification XML, Framework Manager models, and data modules.
|
|
60
|
+
2. **Normalize** them into a vendor-neutral intermediate representation (IR).
|
|
61
|
+
3. **Generate** Power BI Project (PBIP) output — TMDL semantic models and PBIR reports.
|
|
62
|
+
4. **Refine** the output with an AI assistant (Claude, GitHub Copilot, or Codex) to translate
|
|
63
|
+
expressions, layouts, and visuals that have no direct mechanical mapping.
|
|
64
|
+
|
|
65
|
+
The result is a Git-friendly Power BI project you can open in Power BI Desktop, review, and deploy
|
|
66
|
+
to the Power BI / Microsoft Fabric service.
|
|
67
|
+
|
|
68
|
+
## Why use it
|
|
69
|
+
|
|
70
|
+
- **Faster migrations.** Convert hundreds of reports in a fraction of the manual time.
|
|
71
|
+
- **Consistent output.** Deterministic, reviewable PBIP artifacts instead of hand-rebuilt reports.
|
|
72
|
+
- **AI-assisted, not AI-dependent.** The mechanical conversion works without any AI key; AI only
|
|
73
|
+
refines what cannot be mapped deterministically.
|
|
74
|
+
- **Provider-agnostic AI.** Use Claude Code CLI, GitHub Copilot CLI, or OpenAI Codex CLI.
|
|
75
|
+
- **Open and extensible.** MIT-licensed, plugin-friendly parsers and generators.
|
|
76
|
+
|
|
77
|
+
## Supported conversions
|
|
78
|
+
|
|
79
|
+
| Cognos source | Power BI target | Status |
|
|
80
|
+
| --- | --- | --- |
|
|
81
|
+
| Report specification (Report Studio XML) | PBIR report + TMDL tables | Available (beta) |
|
|
82
|
+
| Queries and data items | TMDL columns and measures | Available (beta) |
|
|
83
|
+
| Framework Manager model (`.cpf` / FM XML) | TMDL semantic model | In progress |
|
|
84
|
+
| Data Modules | TMDL semantic model | In progress |
|
|
85
|
+
| Dashboards | PBIR report pages | Planned |
|
|
86
|
+
|
|
87
|
+
See the [migration coverage matrix](docs/coverage.md) for detail on expressions, filters, and
|
|
88
|
+
visual types.
|
|
89
|
+
|
|
90
|
+
## Quick start
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Install
|
|
94
|
+
pip install cognos2powerbi
|
|
95
|
+
|
|
96
|
+
# Convert a single Cognos report specification to a Power BI project
|
|
97
|
+
cognos2pbi migrate ./examples/sample_report.xml --out ./out/SalesReport
|
|
98
|
+
|
|
99
|
+
# Point the generated model at your database (refreshable PBIP)
|
|
100
|
+
cognos2pbi migrate ./examples/sample_report.xml --out ./out/SalesReport \
|
|
101
|
+
--server sql01.contoso.com --database Sales
|
|
102
|
+
|
|
103
|
+
# Convert a Cognos Framework Manager model to a Power BI semantic model
|
|
104
|
+
cognos2pbi migrate-model ./examples/sample_model.xml --out ./out/SalesModel
|
|
105
|
+
|
|
106
|
+
# Open the generated project
|
|
107
|
+
# ./out/SalesReport/SalesReport.pbip -> open in Power BI Desktop
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run from source instead:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
git clone https://github.com/navintkr/cognos-to-powerbi.git
|
|
114
|
+
cd cognos-to-powerbi
|
|
115
|
+
pip install -e ".[dev]"
|
|
116
|
+
cognos2pbi migrate ./examples/sample_report.xml --out ./out/SalesReport
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## AI-assisted refinement (optional)
|
|
120
|
+
|
|
121
|
+
Enable an AI provider to translate complex Cognos expressions and layouts into Power BI DAX and
|
|
122
|
+
PBIR visuals. The provider is selected by configuration and shells out to the corresponding CLI.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Claude Code CLI (default)
|
|
126
|
+
cognos2pbi migrate ./report.xml --out ./out/Report --ai claude
|
|
127
|
+
|
|
128
|
+
# GitHub Copilot CLI
|
|
129
|
+
cognos2pbi migrate ./report.xml --out ./out/Report --ai copilot
|
|
130
|
+
|
|
131
|
+
# OpenAI Codex CLI
|
|
132
|
+
cognos2pbi migrate ./report.xml --out ./out/Report --ai codex
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If no AI provider is configured, the tool completes a deterministic conversion and flags items that
|
|
136
|
+
need manual review. See [docs/ai-providers.md](docs/ai-providers.md).
|
|
137
|
+
|
|
138
|
+
## How it works
|
|
139
|
+
|
|
140
|
+
```mermaid
|
|
141
|
+
flowchart LR
|
|
142
|
+
A[Cognos artifacts<br/>report XML, FM model, data module] --> B[Parsers]
|
|
143
|
+
B --> C[Intermediate Representation<br/>vendor-neutral IR]
|
|
144
|
+
C --> D[PBIP Generators<br/>TMDL + PBIR]
|
|
145
|
+
D --> E[AI Refinement<br/>Claude / Copilot / Codex]
|
|
146
|
+
E --> F[Power BI Project<br/>.pbip]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The intermediate representation decouples parsing from generation, so new Cognos inputs and new
|
|
150
|
+
Power BI output formats can be added independently. See [docs/architecture.md](docs/architecture.md).
|
|
151
|
+
|
|
152
|
+
## Project layout
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
cognos-to-powerbi/
|
|
156
|
+
├── src/cognos2powerbi/
|
|
157
|
+
│ ├── cli.py # Command-line interface
|
|
158
|
+
│ ├── core/
|
|
159
|
+
│ │ ├── ir/ # Vendor-neutral intermediate representation
|
|
160
|
+
│ │ ├── parsers/ # Cognos report/model parsers
|
|
161
|
+
│ │ ├── generators/ # PBIP (TMDL + PBIR) generators
|
|
162
|
+
│ │ ├── translate/ # Deterministic Cognos-to-DAX translation
|
|
163
|
+
│ │ ├── ai/ # Provider-agnostic AI adapter
|
|
164
|
+
│ │ └── pipeline.py # Orchestration
|
|
165
|
+
│ └── api/ # FastAPI backend (SaaS surface)
|
|
166
|
+
├── web/ # Single-page web frontend
|
|
167
|
+
├── examples/ # Sample Cognos inputs
|
|
168
|
+
├── docs/ # Documentation
|
|
169
|
+
└── tests/ # Test suite
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Run the SaaS API locally
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
pip install -e ".[api]"
|
|
176
|
+
uvicorn cognos2powerbi.api.main:app --reload
|
|
177
|
+
# Open the web UI at http://127.0.0.1:8000/
|
|
178
|
+
# Or POST a Cognos report to http://127.0.0.1:8000/api/v1/migrate
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Roadmap
|
|
182
|
+
|
|
183
|
+
- [x] Framework Manager model conversion to TMDL
|
|
184
|
+
- [ ] Data Module conversion
|
|
185
|
+
- [ ] Dashboard to PBIR page mapping
|
|
186
|
+
- [ ] Expression translation library (Cognos -> DAX)
|
|
187
|
+
- [ ] Hosted SaaS portal with upload, review, and download
|
|
188
|
+
- [ ] Batch / folder migration with a coverage report
|
|
189
|
+
|
|
190
|
+
Full roadmap: [docs/roadmap.md](docs/roadmap.md).
|
|
191
|
+
|
|
192
|
+
## Contributing
|
|
193
|
+
|
|
194
|
+
Contributions are welcome and wanted. Good first issues are labeled
|
|
195
|
+
[`good first issue`](https://github.com/navintkr/cognos-to-powerbi/labels/good%20first%20issue).
|
|
196
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) to get started.
|
|
197
|
+
|
|
198
|
+
## Security
|
|
199
|
+
|
|
200
|
+
Report vulnerabilities privately per our [security policy](SECURITY.md). Do not open public issues
|
|
201
|
+
for security reports.
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
Licensed under the [MIT License](LICENSE).
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### Keywords
|
|
210
|
+
|
|
211
|
+
Cognos to Power BI, Cognos Power BI migration, IBM Cognos migration tool, convert Cognos reports to
|
|
212
|
+
Power BI, Cognos report converter, Power BI PBIP TMDL PBIR generator, business intelligence
|
|
213
|
+
migration, automated report migration.
|